Skip to main content
Version: Latest

Talk

Sends a text message to an active session, allowing the avatar to forward the query to an LLM and speak the generated response.

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

Headers

HeaderValue
AuthorizationBearer {session_token}
Content-Typeapplication/json

Body

ParameterTypeRequiredDescription
messagestringrequiredUser text (server-side max length enforced)
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.

Tip: You can use [FIRST_MESSAGE] when you already have the exact text the avatar should say and want to inject that response directly.

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 sent successfully"
}

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.