Streaming lets your UI render tokens as they are generated instead of waiting for a full response.Documentation Index
Fetch the complete documentation index at: https://docs.ai-stats.phaseo.app/llms.txt
Use this file to discover all available pages before exploring further.
Supported endpoints
POST /v1/responsesPOST /v1/chat/completionsPOST /v1/messages
Enable streaming
Setstream: true in the request body.
SSE frame shape
Streams are returned as SSE frames:Error handling during streams
- If a request fails before streaming starts, you receive a normal JSON error response.
- If a request fails after partial output, treat the stream as incomplete and surface a retry path in your UI.
- Always log
generation_id(when present) for support and correlation.
Cancellation
Use cancellation controls (AbortController in JS, request timeout in backend workers) so abandoned streams do not consume unnecessary capacity.
Known limitation
At the current gateway request-validation layer,stream: true with tool-calling is rejected. Use non-streaming for tool-calling loops.