Skip to main content
POST
Creates a session and returns everything needed to start streaming: the session id, the resolved room binding, and ingestion (url + single-use wsToken).
ingestion.wsToken is valid for 15 minutes and is consumed by the first WebSocket connection. Open the socket promptly; if it lapses, call reconnect.
Strict validation rules to be aware of:
  • Only avatarId, room, livekit_room_id, and inputProvider are accepted - anything else returns REQUEST_FIELD_UNKNOWN with error.details.fields.
  • waitForIngestion was removed and returns WAIT_FOR_INGESTION_REMOVED.
  • Legacy byolr, livekitUrl, and livekitToken return ROOM_LEGACY_FIELDS.
  • avatarId must reference an active platform default or one of your custom avatars, otherwise AVATAR_NOT_FOUND.

Authorizations

x-api-key
string
header
required

FaceMode API key (fm_...).

Body

application/json
avatarId
string<uuid>
required

ID of an active avatar (platform default or owned custom).

room
object
required

Egress room the avatar joins and publishes video into.

livekit_room_id
string

Optional explicit room name override. Takes precedence over room.name and the LiveKit token claim.

inputProvider
enum<string> | null

Upstream speech provider producing the audio streamed into the session. Used for provider-specific handling; custom or omitted means canonical PCM streaming.

Available options:
deepgram,
gemini,
gnani,
elevenlabs,
openai,
cartesia,
sarvam,
custom

Response

Session created. ingestion.wsToken is short-lived and single-use; store session.id for status, reconnect, and end calls.

message
string
Example:

"Session created successfully"

session
object

Session block embedded in the create response.

roomName
string
room
object

Egress room the avatar joins and publishes video into.

egressType
enum<string>
Available options:
livekit,
daily
roomUrl
string
roomToken
string
inputProvider
enum<string> | null

Upstream speech provider producing the audio streamed into the session. Used for provider-specific handling; custom or omitted means canonical PCM streaming.

Available options:
deepgram,
gemini,
gnani,
elevenlabs,
openai,
cartesia,
sarvam,
custom
jobId
string | null

Worker job identifier.

workerStatus
enum<string> | null

Media worker lifecycle: PENDING/ASSIGNING mean capacity is still being allocated, ASSIGNED/ACTIVE mean a worker owns the session, ENDING means cleanup is in flight, ENDED/FAILED are terminal.

Available options:
PENDING,
ASSIGNING,
ASSIGNED,
ACTIVE,
ENDING,
ENDED,
FAILED
workerAssignment
object | null

Worker placement metadata for the session. Treat as opaque - fields may change. Useful for correlating jobId with support tickets.

ingestion
object

Audio ingestion endpoint for the session. url and wsToken are present only when ready is true.

greetingVideoUrl
string

Optional greeting clip the worker can play on join.

idleVideoUrl
string | null

Idle loop clip for the avatar, when rendered.

idleVideoStatus
string

Idle video render state, for example PENDING, READY, or FAILED.