Skip to main content
Streaming on the /v1/chat/completions endpoint enables your applications to display text tokens as soon as they are produced by the AI model, minimizing perceived latency for chat and terminal interfaces.

Event Stream Format

Each chunk arrives as an SSE event in data: <JSON> format:
When generation finishes, the gateway transmits the standard completion signal:

Tracking Token Usage During Streams

Pass stream_options to receive the final token accounting block in the trailing chunk:

Next Steps