OpenAI-compatible
POST
/v1/chat/completions/v1/chat/completions
| Field | Type | Description |
|---|---|---|
| model | string · required | 来自 GET /v1/models 的 model id。 |
| messages | array · required | 对话讯息,每则为 { role, content }。 |
| max_tokens | integer | 最大输出 token 数。reasoning 模型的思考也吃这个额度——设太低会拿到内容为空的 `200`(见[错误](/docs/errors))。 |
| temperature | number | 取样温度,0–2。 |
| stream | boolean | 以 SSE chunk 串流回应。 |
| tools | array | Tool/function 定义(OpenAI tool schema)。 |