Streaming
Set"stream": true to get text/event-stream. Frames are data: {...}
lines terminated by data: [DONE]. Non-data: lines never appear.
- Raw upstream chunks pass through untouched, including
reasoning_contentdeltas, so you can render thinking live. stream_options: {"include_usage": true}is accepted and forwarded.- The
modelfield 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.