Streaming
Streaming is a property of the Chat Completions request, not a route of its own. There is no /v1/stream endpoint to discover: you set "stream": true on a normal request and the answer arrives in pieces instead of one response object.
With an SDK
The OpenAI SDKs already do the right thing, so nothing extra is needed beyond the base URL and the key:
stream = client.chat.completions.create(
model="ling-3.0-flash-sante",
messages=[{"role": "user", "content": "Count to five"}],
stream=True,
)
for chunk in stream:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)On the wire
Underneath, the response is a stream of server-sent events: one data: line per chunk, in the same shape OpenAI uses for this route. If you call the API with httpx or requests instead of an SDK, read the body line by line and parse the JSON after data: — do not wait for the whole response, which is exactly what streaming avoids.
When not to stream
Streaming makes a slow answer feel fast; it does not make code simpler. For a script that needs the finished text once, a non-streamed request is fewer moving parts and one failure mode instead of two. Use "stream": true when a human is watching the output, or when the answer is long enough that the first token is worth showing.
What is guaranteed
The public hosted contract covers the Models and Chat Completions routes. A streamed answer is the same route with a parameter set, so it carries the same guarantees — and the same explicit-error behaviour when the request or the model ID is wrong.
Next
- POST /v1/chat/completions — the request this parameter belongs to.
- Python streaming — the same thing through the Python client.