Answer the WebRTC offer

Submits the client's SDP answer, completing the handshake.

If the GPU host rejects the answer the stream is closed server-side — but this endpoint still returns 200 {}, so check stream status rather than treating the response as confirmation.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
curl -X PUT 'https://apis.elai.io/api/v1/streams/66a1f0c2b7cd13032a9c6200' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "answer": "<answer>"
}'

Next: speak-on-stream — the connection is up — this is how the avatar talks.

Path Params
string
required

Stream id returned by POST /streams.

Body Params
answer
object
required

The client's SDP answer.

Responses

streamId is not a valid ObjectId, there is no such stream, it belongs to another workspace, or it is already closed. All four cases return 400.

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