Skip to main content
POST
/
v3
/
avatar-realtime
/
{stream_id}
/
text
Append Avatar Realtime Text
curl --request POST \
  --url https://api.heygen.com/v3/avatar-realtime/{stream_id}/text \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "delta": "<string>",
  "final": false
}
'
{
  "data": {
    "buffered_bytes": 123,
    "ok": true
  }
}

Authorizations

x-api-key
string
header
required

HeyGen API key. Obtain from your HeyGen dashboard.

Path Parameters

stream_id
string
required

Streaming session identifier returned by POST /v3/avatar-realtime.

Body

application/json

Append one text delta to a streaming session created with type='text_stream'.

delta
string
required

Text fragment to append. May be a single token or a coalesced batch of tokens. Must be non-empty unless final: true (which allows an empty delta to close the stream).

final
boolean
default:false

If true, this is the last delta — input is closed after this request. Further POSTs to this stream return 410.

Response

Accepted — submission acknowledged; poll for completion.

data
AppendTextDeltaResponse · object

Response data for POST /v3/avatar-realtime/{stream_id}/text.