Stream Chat Post
Start a new turn and return an AI SDK UI message stream.
Returns an SSE stream (text/event-stream) with Vercel AI SDK chunks (text fragments, tool-call UI, tool results). The generation runs in a background task that survives client disconnects; reconnect via GET /sessions/{session_id}/stream to resume.
Follow-up messages typed while a turn is already running should use POST /sessions/{session_id}/messages/pending. If an older client still posts that follow-up here, we queue it defensively but still return a valid empty UI-message stream so AI SDK transports never receive a JSON body from the stream endpoint.
Args: session_id: The chat session identifier. request: Request body with message, is_user_message, and optional context. user_id: Authenticated user ID.
Path parameters
Request body
Response
Successful Response
Changes
Changed in 9 of the 92 revisions of this API.29
- ○
added the new optional request property
expert_kickoffnew-optional-request-property
- ○
- ○
added the non-success response with the status
402response-non-success-status-added
- ○
- ○
removed the non-success response with the status
402response-non-success-status-removed
This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
added the non-success response with the status
402response-non-success-status-added
- ○
- ○
added the non-success response with the status
503response-non-success-status-added
- ○
- ○
added the new optional request property
message_idnew-optional-request-property
- ○
- ●
removed the request property
message_idrequest-property-removed
This revision also has 4 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ●
- ○
added the new optional request property
message_idnew-optional-request-property
- ○
- ●
removed the request property
message_idrequest-property-removed
- ○
removed the non-success response with the status
402response-non-success-status-removed
- ○
removed the non-success response with the status
503response-non-success-status-removed
This revision also has 96 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ●