post https://api.heygen.com/v1/streaming.task
This endpoint is used to send a text to an Interactive Avatar, prompting it to speak the provided text.
Interactive Avatar is getting upgraded to LiveAvatar! Now with its own website and app. Learn more
We recommend integrating directly with LiveAvatar instead. Docs
Request Body
| Field | Type | Description |
|---|---|---|
session_id | string | The ID of the session to which the task is to be sent. |
text | string | The text of the task. |
task_mode | string | Whether the task is performed synchronously or not (available values: sync and async; default is sync) |
task_type | string | Task type: repeat or chat ( repeat will simply repeat the input text; for chat type, input text is the message to the avatar and avatar will respond according to the knowledge base set in streaming.new API |
Response Body
| Field | Type | Description |
|---|---|---|
duration_ms | float | how long the avatar speaks for the input text |
task_id | string | id to reference the task |
