Open a live-avatar stream

Allocates a GPU host, starts a WebRTC session and returns the SDP offer to answer.

The handshake is: POST /streams → answer the offer with PUT /streams/{streamId} → trickle ICE candidates with POST /streams/candidate/{streamId} → speak with POST /streams/render/{streamId}.

Streaming minutes are billed at 0.5× the normal rate. A workspace with no minutes left is rejected with 429 unless the organization has allowOverlimit.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
curl -X POST 'https://apis.elai.io/api/v1/streams' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "voiceId": "en-US-JennyNeural",
  "voiceProvider": "azure",
  "avatarCode": "gia.casual"
}'

Next: answer-stream-offer — the stream is not usable until you answer the SDP offer.

Body Params
string
required

Voice to speak with.

string
required

Provider that owns voiceId.

string
required

Avatar variant code. Must be an avatar with a realtimeConfig — see GET /avatars?realtime=true.

string

Pin the session to a specific GPU host. Leave unset to let the scheduler choose.

Responses

voiceId, voiceProvider or avatarCode missing.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json