SetDocumentation Index
Fetch the complete documentation index at: https://docs.tera.gw/llms.txt
Use this file to discover all available pages before exploring further.
"stream": true to receive tokens incrementally. Tera streams responses as Server-Sent Events on the same /v1/chat/completions endpoint.
Wire format
Each event is a single line prefixed withdata: carrying a JSON delta. The stream terminates with data: [DONE].
Reading the stream
Finish reasons
The final non-[DONE] event has a non-null finish_reason:
stop— natural end of generationlength— hitmax_tokensor the model’s max contexttool_calls— the model emitted a tool call (see Tool calling)
Streaming with reasoning models
Reasoning models (e.g.Qwen/Qwen3.5-27B) stream reasoning_content deltas before the visible content. See Reasoning.
Operational notes
- Heartbeats — we do not currently send keep-alive comments. Configure client read timeouts above your expected longest generation (server-side default: 120s).
- Disconnects — if the client disconnects mid-stream, generation is cancelled on the backend.
- HTTP/2 — Tera supports HTTP/2; SDK defaults are fine.