API
Streaming
How SSE streaming works, what delta fields Routera emits, and what the final chunk contains.
Public base URL
Routera publishes the API at https://routera.one/api/v1.
Routera supports streaming chat completions over Server-Sent Events.
SSE format
Set stream: true:
curl https://routera.one/api/v1/chat/completions \
-H "Authorization: Bearer rta_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.5",
"stream": true,
"messages": [
{ "role": "user", "content": "Explain SSE in one paragraph." }
]
}'
The response is a text event stream ending with:
data: [DONE]
Stream deltas
Routera currently emits chunk payloads shaped like OpenAI streaming responses. Deltas may contain:
| Field | Meaning |
|---|---|
choices[0].delta.content | Assistant text delta |
choices[0].delta.reasoning | Reasoning delta when present |
choices[0].finish_reason | null until completion |
Final chunk
The final non-error chunk includes:
finish_reason: "stop"- usage counters
- reasoning token counts when available
cost,duration_ms, andtokens_per_secondin the usage payload
If the upstream provider errors during streaming, Routera emits an error chunk before sending [DONE].