聊天完成 (OpenAI 兼容)
Chat (Multi-Protocol AI Gateway)
Chat Completions
POST
聊天完成 (OpenAI 兼容)
💡 Quick Examples
- Python
- Node.js
- Java
- Go
📤 Response Format
Non-streaming Response
Streaming Response (SSE)
🔧 API Reference
The interactive API form below is auto-generated from OpenAPI spec. All available models are shown in the
model dropdown.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
模型名称
Available options:
gpt-5.1, gpt-5.1-all, gpt-5.1-thinking, gpt-5.1-thinking-all, gpt-5.2, gpt-5.3, gpt-5.3-codex, gpt-5.4, gemini-3-pro, gemini-2.5-pro, gemini-2.5-flash, gemini-3-flash, gemini-3.1-pro, claude-4.5, claude-opus-4-6, claude-haiku-4-5-20251001, claude-sonnet-4-6, claude-opus-4-7 Example:
"gpt-5.1"
消息列表
Example:
[
{
"role": "system",
"content": "You are a helpful assistant."
},
{ "role": "user", "content": "Hello!" }
]是否流式输出
Example:
false
温度 (0-2)
Example:
1
最大 token 数
Example:
1000
最大补全 token 数 (新版参数)
Example:
1000
Top P
Example:
1
频率惩罚 (-2.0 到 2.0)
Example:
0
存在惩罚 (-2.0 到 2.0)
Example:
0
停止序列
生成数量
Example:
1
随机种子
Example:
12345
用户标识
工具列表 (Function Calling)
工具选择策略
响应格式
是否返回 logprobs
Example:
false
top logprobs 数量
Example:
5
logit 偏置
并行工具调用
Example:
true
Response
200
成功