Send Text Task to Interactive Avatar
POST
https://api.konpro.ai/v1/streaming/taskSend a text message to an active Interactive Avatar session, prompting the avatar to speak or respond based on the specified task type.
Request History
Log in to see full request history
| TIME | STATUS | USER AGENT |
|---|---|---|
| Make a request to see history. | ||
0 Requests This Month
Request Body Parameters
| Field | Type | Description |
|---|---|---|
| session_id | string | The session identifier to which the task is sent |
| text | string | The text content to be spoken or used as a chat message for the avatar |
| task_mode | string | (Optional) Execution mode: "sync" for synchronous or "async" for asynchronous processing (default is "sync") |
| task_type | string | (Optional) Type of task: "repeat" makes the avatar repeat the text; "chat" makes the avatar respond via its knowledge base |
Response Fields
| Field | Type | Description |
|---|---|---|
| duration_ms | float | Duration (milliseconds) the avatar speaks the given text |
| task_id | string | Identifier of the submitted task for reference |
cURL Request
shell
curl --request POST \
--url https://api.konpro.ai/v1/streaming/task \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
"session_id": "session123",
"text": "Hello, how can I assist you today?",
"task_mode": "sync",
"task_type": "chat"
}'LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Success
400 - Bad Request
LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Success
400 - Bad Request