POST /api/arena/chat/stream streams a single model’s answer as server-sent events. It takes the same body as POST /api/arena/chat and requires a bearer token.
The arena currently uses the non-streaming endpoints for both battles and direct chat. Streaming is available for clients that want token-by-token output for one model.
Event format
The response hasContent-Type: text/event-stream. Each event is a single data: line with a JSON object, followed by a blank line.
Errors after the stream starts arrive inside a
200 stream, so always check object. Authentication failures happen before that and return a plain 401 with no body, so check the HTTP status first.
Differences from the non-streaming endpoint
- No fallback model. If the provider can’t be resolved the API uses Groq; if the call fails you get an
ai.errorevent. - No thread messages are written, even with
threadId. - No usage or timing summary is sent.
- Closing the connection cancels the provider request.