Chapter 6 of 211 min

6. Responses API#

POST /v1/responses — a compatible implementation of the OpenAI Responses API. It accepts input (a string or a message array) plus an optional instructions field (equivalent to a system prompt), and internally converts the request into a chat completion.

cURL
curl http://183.240.79.21:52099/v1/responses \
  -H "Authorization: Bearer sk-你的YiTuoToken-Key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "instructions": "你是一个简洁的助手。",
    "input": "用一句话解释什么是量子纠缠"
  }'

input can also be a message array:

JSON
{
  "model": "gpt-4o",
  "input": [
    { "role": "user", "content": "你好" }
  ]
}