Skip to main content

Streaming

Set "stream": true to get text/event-stream. Frames are data: {...} lines terminated by data: [DONE]. Non-data: lines never appear.
Notes:
  • Raw upstream chunks pass through untouched, including reasoning_content deltas, so you can render thinking live.
  • stream_options: {"include_usage": true} is accepted and forwarded.
  • The model field always echoes your public id.
  • If credits run out mid-stream you get a terminal error event, then [DONE]:
  • Disconnecting aborts the generation server-side; you are billed only for tokens produced.