Streaming
Set"stream": true to get text/event-stream. Frames are data: {...}
lines terminated by data: [DONE]. Non-data: lines never appear.
- Chunks stream as they are generated, including
reasoning_contentdeltas, so you can render thinking live. stream_options: {"include_usage": true}is accepted.- 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.