Skip to main content
Set stream: true to receive tokens as they’re generated over SSE instead of waiting for the full response.

Request

Code examples

SSE format

Each event is a data: line containing a JSON chunk. The stream ends with data: [DONE].
When using smart routing (model: "auto"), the first chunk includes a routing object with the resolved model — before any content tokens arrive.

Notes

  • Streaming works with all models, smart routing variants, and sessions.
  • Response caching is automatically disabled for streaming requests.
  • Billing is the same as non-streaming — you’re charged at the resolved model’s rate.