Responses 接口

Responses 接口

POST /v1/responses 是 OpenAI Responses 格式的接口。ChatGPT 桌面端和 Codex 在 config.toml 里把 wire_api 设为 responses 时,就会走这条路径。自己写应用时,仍可优先使用更常见的 /v1/chat/completions。

最小请求

curl https://www.vvkapi.com/v1/responses \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxxxxxxxxxxxx" \
  -d '{
    "model": "gpt-6.1-sol",
    "input": "你好,请用一句话介绍你自己"
  }'

常用字段包括 model、input(字符串或消息数组)、instructions、stream 等。成功时返回的 object 为 response,文本一般在 output 里。

和对话接口的关系

若你使用官方 ChatGPT / Codex 客户端,一般只需正确填写基址和密钥,不必自己拼 Responses 请求。手动配置见 应用对接。