v29

latestOpenAPI 3.1.2raw.githubusercontent.com2026-08-014117755.2 KB
Messages

Send Message (Streaming)

Sends a new message to an existing chat and returns a Server-Sent Events stream. Events include the initial assistant-message snapshot, content chunk deltas, final usage, and a closing message snapshot. The response is text/event-stream; each event is data: <JSON>\n\n where the JSON conforms to MessageStreamEvent.

post/chats/{chatId}/messages/stream

Path parameters

chatIdstring required

The unique identifier of the chat.

Request body

messagestring required

The prompt or instruction to send to the model.

systemPromptstring

System-level context for the chat, such as frameworks or development environment details.

mcpServerIdsstring[]

MCP server IDs to enable. When omitted, uses default enabled servers.

Response

A single Server-Sent Events payload emitted by the streaming send-message endpoint. Each SSE event is data: <JSON>\n\n where the JSON conforms to one of the union members.