> ## Documentation Index
> Fetch the complete documentation index at: https://docs.llm7.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Streaming

> Stream chat tokens for lower latency responses.

Stream responses to start rendering before the full completion is ready.

```python theme={null}
import openai

client = openai.OpenAI(
    base_url="https://api.llm7.io/v1",
    api_key="unused",  # Use a https://dash.llm7.io/ token for higher limits.
)

stream = client.chat.completions.create(
    model="fast",  # or another model with stream: true from /v1/models
    messages=[
        {"role": "system", "content": "Answer concisely."},
        {"role": "user", "content": "List three tips for fast Python scripts."},
    ],
    stream=True,
    temperature=0.4,
)

for chunk in stream:
    delta = chunk.choices[0].delta.content or ""
    print(delta, end="", flush=True)
```

<Tip>
  Each chunk includes `choices[0].delta` content. Watch `choices[0].finish_reason` to know when the stream ends. Use the [Models API](/guides/models-api) to find models with `stream: true`.
</Tip>
