Skip to main content
Version: Latest

Talk

Sends a text message to an active session so the avatar speaks that content.

This API does not include an LLM. You must supply text produced by an external LLM (OpenAI, etc.).

POST/api/v2/sessions/{sessionId}/talk

Headers

HeaderValue
AuthorizationBearer {session_token}
Content-Typeapplication/json

Body

ParameterTypeRequiredDescription
messagestringrequiredText for the avatar to speak
typestringoptionalReserved for future use (defaults are fine; no need to set)

Notes

  • Sessions are scoped to the appId they were created with.
  • You cannot access a sessionId that belongs to a different appId.

Examples

curl https://ai-streamer.deepbrain.io/api/v2/sessions/${SESSION_ID}/talk \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${SESSION_TOKEN}" \
-X POST \
-d '{
"message": "Hello."
}'

Success (code: 1000)

{
"code": 1000,
"data": null,
"message": "Message has been sent"
}

Next step

Call this API repeatedly to continue the conversation. Use List Sessions or Get Session Detail to manage sessions when needed, and call Stop Session to end the conversation.