Send Text Task to Interactive Avatar

POSThttps://api.konpro.ai/v1/streaming/task

Send 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

TIMESTATUSUSER AGENT
Make a request to see history.

0 Requests This Month

Request Body Parameters

FieldTypeDescription
session_idstringThe session identifier to which the task is sent
textstringThe text content to be spoken or used as a chat message for the avatar
task_modestring(Optional) Execution mode: "sync" for synchronous or "async" for asynchronous processing (default is "sync")
task_typestring(Optional) Type of task: "repeat" makes the avatar repeat the text; "chat" makes the avatar respond via its knowledge base

Response Fields

FieldTypeDescription
duration_msfloatDuration (milliseconds) the avatar speaks the given text
task_idstringIdentifier 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