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

# 流式输出

> 逐步接收模型输出

对支持流式输出的 JSON 请求加入 `"stream": true`。Chat Completions 与 Responses 通常以 Server-Sent Events 返回增量事件，客户端应逐行读取 `data:` 数据并处理结束事件。

```json theme={null}
{"model":"your-model","messages":[{"role":"user","content":"你好"}],"stream":true}
```

客户端断开后请求可能仍已产生费用。网络失败时使用指数退避；不要无条件立即重放非幂等请求。
