Appearance
Responses API
端点:
POST https://oneapi.zaiwenai.com/v1/responses
与 OpenAI Responses API 接口兼容。Codex 等客户端使用此接口格式。
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 模型名称 |
input | string | array | 是 | 输入内容 |
stream | boolean | 否 | 是否启用流式响应,默认 false |
其他参数请参考 OpenAI Responses API 文档。
Curl 示例
bash
curl https://oneapi.zaiwenai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_API_KEY" \
-d '{
"model": "gpt-5.4-mini",
"input": "What is the capital of France?"
}'流式响应
bash
curl https://oneapi.zaiwenai.com/v1/responses \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $YOUR_API_KEY" \
-d '{
"model": "gpt-5.4-mini",
"input": "Tell me a short story",
"stream": true
}'计费说明
与 Chat Completions 接口相同,按 Token 用量计费。