Create a session
POST /api/sessions - create a streaming session that binds an avatar to a LiveKit or Daily room and returns ingestion WebSocket credentials.
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.- Only
avatarId,room,livekit_room_id, andinputProviderare accepted - anything else returnsREQUEST_FIELD_UNKNOWNwitherror.details.fields. waitForIngestionwas removed and returnsWAIT_FOR_INGESTION_REMOVED.- Legacy
byolr,livekitUrl, andlivekitTokenreturnROOM_LEGACY_FIELDS. avatarIdmust reference an active platform default or one of your custom avatars, otherwiseAVATAR_NOT_FOUND.
Authorizations
FaceMode API key (fm_...).
Body
ID of an active avatar (platform default or owned custom).
Egress room the avatar joins and publishes video into.
Optional explicit room name override. Takes precedence over room.name and the LiveKit token claim.
Upstream speech provider producing the audio streamed into the session. Used for provider-specific handling; custom or omitted means canonical PCM streaming.
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.
"Session created successfully"
Session block embedded in the create response.
Egress room the avatar joins and publishes video into.
livekit, daily Upstream speech provider producing the audio streamed into the session. Used for provider-specific handling; custom or omitted means canonical PCM streaming.
deepgram, gemini, gnani, elevenlabs, openai, cartesia, sarvam, custom Worker job identifier.
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.
PENDING, ASSIGNING, ASSIGNED, ACTIVE, ENDING, ENDED, FAILED Worker placement metadata for the session. Treat as opaque - fields may change. Useful for correlating jobId with support tickets.
Audio ingestion endpoint for the session. url and wsToken are present only when ready is true.
Optional greeting clip the worker can play on join.
Idle loop clip for the avatar, when rendered.
Idle video render state, for example PENDING, READY, or FAILED.