Skip to content
Rapid Router
← API reference

Streaming

Part of the Rapid Router API reference. One OpenAI-compatible endpoint, https://rapidrouter.ai/api/v1, in front of every model in the catalog.

04Streaming

Set "stream": true for server-sent events. Deltas arrive in the standard chunk shape and the stream terminates with data: [DONE]. A final usage chunk carries the billed cost.

data: {"object":"chat.completion.chunk","model":"anthropic/claude-sonnet-5","choices":[{"index":0,"delta":{"content":"Rou"},"finish_reason":null}]}
data: {"object":"chat.completion.chunk","model":"anthropic/claude-sonnet-5","choices":[{"index":0,"delta":{"content":"ting"},"finish_reason":null}]}
data: {"object":"chat.completion.chunk","model":"anthropic/claude-sonnet-5","choices":[{"index":0,"delta":{},"finish_reason":"stop"}]}
data: {"object":"chat.completion.chunk","choices":[],"usage":{"prompt_tokens":18,"completion_tokens":96,"total_tokens":114,"cost":0.00074}}
data: [DONE]