API Reference
Responses
使用 OpenAI Responses 兼容接口接入新版 SDK、工具调用和 Codex 类客户端。
Responses 是 OpenAI 新版接口形态。部分新版工具和 coding agent 会优先使用它,例如 Codex 类客户端可能要求 wire_api = "responses"。
Endpoint
POST https://0x1c.io/v1/responses最小请求
curl https://0x1c.io/v1/responses \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID",
"input": "用一句话解释什么是 API 中转站。"
}'多轮消息
{
"model": "MODEL_ID",
"input": [
{
"role": "system",
"content": "你是一个面向新手的中文技术文档助手。"
},
{
"role": "user",
"content": "解释 Base URL 和 Endpoint 的区别。"
}
]
}什么时候用 Responses
建议在这些场景使用:
- 客户端明确要求 Responses API。
- Codex 或类似工具配置里有
wire_api选项。 - 新版 OpenAI SDK 示例使用
client.responses.create()。 - 你需要更统一的输入输出结构。
如果你的工具只支持 Chat Completions,就继续使用 /v1/chat/completions。
Codex 相关提醒
Codex 类工具通常会读取本机配置文件。你需要同时配置:
- Provider 名称。
- Base URL。
- API Key 环境变量。
- 使用 Responses 还是 Chat Completions。
- 模型 ID。
完整示例见 Codex 接入指南。