Skip to main content
POST
Send a message and stream the reply as server-sent events

Authorizations

Authorization
string
header
required

Agent API key: Authorization: Bearer cht_live_<key_id>.

Headers

Idempotency-Key
string
required

Client-chosen value, 1-255 characters, unique per logical request; a retry with the same value and body returns the stored result

Required string length: 1 - 255

Path Parameters

agent_id
string
required

Body

application/json

Text-only chat input; attachments are outside this release, so any extra field is a validation error rather than silently ignored.

external_user_id
string
required

Stable id of the end user on the caller's side

Required string length: 1 - 255
message
string
required
Minimum string length: 1

Response

SSE stream: response.created, response.output_text.delta*, then response.completed or error