Chat Completions API
OpenAI 兼容的 Chat Completions API
端点: POST /v1/chat/completions
请求参数
| 参数 | 类型 | 说明 |
|---|---|---|
| model | string | 模型名称 (如 claude-sonnet) |
| messages | array | 对话消息列表 |
| stream | boolean | 是否流式响应 |
| max_tokens | int | 最大输出 token 数 |
端点: POST /v1/chat/completions
| 参数 | 类型 | 说明 |
|---|---|---|
| model | string | 模型名称 (如 claude-sonnet) |
| messages | array | 对话消息列表 |
| stream | boolean | 是否流式响应 |
| max_tokens | int | 最大输出 token 数 |