Basic streaming
Setstream: true in your request to enable streaming:
Async streaming (Python)
For async applications, use the async client:Stream with usage stats
To receive token usage statistics with your stream, enablestream_options:
usage object with prompt_tokens, completion_tokens, and total_tokens.
SSE format
Each streamed chunk is a JSON object sent as an SSE event:data: [DONE].