Create Speech-to-Video Session
curl --request POST \
--url https://api.bey.dev/v1/sessions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"url": "wss://<your-domain>.livekit.cloud",
"token": "<your-livekit-token>",
"transport": "livekit"
}
'import requests
url = "https://api.bey.dev/v1/sessions"
payload = {
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"url": "wss://<your-domain>.livekit.cloud",
"token": "<your-livekit-token>",
"transport": "livekit"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
avatar_id: '01234567-89ab-cdef-0123-456789abcdef',
url: 'wss://<your-domain>.livekit.cloud',
token: '<your-livekit-token>',
transport: 'livekit'
})
};
fetch('https://api.bey.dev/v1/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"status": {
"type": "to_start"
},
"url": "wss://<your-domain>.livekit.cloud",
"transport": "livekit"
}Speech-to-Video Sessions
Create Speech-to-Video Session
Create a speech-to-video session.
Tip: do not use this directly, use the LiveKit plugin instead.
See <https://docs.livekit.io/agents/integrations/avatar/bey>.
POST
/
v1
/
sessions
Create Speech-to-Video Session
curl --request POST \
--url https://api.bey.dev/v1/sessions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"url": "wss://<your-domain>.livekit.cloud",
"token": "<your-livekit-token>",
"transport": "livekit"
}
'import requests
url = "https://api.bey.dev/v1/sessions"
payload = {
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"url": "wss://<your-domain>.livekit.cloud",
"token": "<your-livekit-token>",
"transport": "livekit"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
avatar_id: '01234567-89ab-cdef-0123-456789abcdef',
url: 'wss://<your-domain>.livekit.cloud',
token: '<your-livekit-token>',
transport: 'livekit'
})
};
fetch('https://api.bey.dev/v1/sessions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "01234567-89ab-cdef-0123-456789abcdef",
"avatar_id": "01234567-89ab-cdef-0123-456789abcdef",
"status": {
"type": "to_start"
},
"url": "wss://<your-domain>.livekit.cloud",
"transport": "livekit"
}Authorizations
Your Beyond Presence API Key.
Body
application/json
- CreateLivekitSessionRequest
- CreatePipecatSessionRequest
Request body to create a LiveKit speech-to-video session.
ID of avatar to use.
Example:
"01234567-89ab-cdef-0123-456789abcdef"
URL of LiveKit server the avatar worker should connect to.
Example:
"wss://<your-domain>.livekit.cloud"
The token used to join your LiveKit room.
Example:
"<your-livekit-token>"
Allowed value:
"livekit"Response
Created Speech-to-Video Session with ID
- LivekitSessionResponse
- PipecatSessionResponse
Response body for a LiveKit speech-to-video session.
Unique identifier of the object in the database.
Example:
"01234567-89ab-cdef-0123-456789abcdef"
ID of avatar to use.
Example:
"01234567-89ab-cdef-0123-456789abcdef"
Session that has not yet started.
- SessionStatusToStart
- SessionStatusOngoing
- SessionStatusCompleted
Show child attributes
Show child attributes
URL of LiveKit server the avatar worker should connect to.
Example:
"wss://<your-domain>.livekit.cloud"
Allowed value:
"livekit"Was this page helpful?