Send Message
string
required
User message, 1–2000 characters.
string
required
Actor role sending the message (non-empty string, e.g.
"user").string
Session identifier for grouping threads.
object
App-specific lesson context, passed through to prompt construction.
object
App-specific session context, passed through to prompt construction.
object
Free-form page/document context.
object[]
Prior messages to seed context, if not relying on
threadId.object
Response
string
string
string
The assistant’s reply
string
"assistant"object
object
Send Message (Streaming)
object
Response
Content-Type: text/event-stream. Each data: event is one of:
Token chunk
Done (final event)
Error