제6장 / 총 21장약 1분

6. Responses API#

POST /v1/responses — OpenAI Responses API 호환 구현입니다. input(문자열 또는 메시지 배열)과 선택 사항인 instructions(system 프롬프트에 해당)을 받아 내부적으로 채팅 완성으로 변환해 처리합니다.

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은 메시지 배열일 수도 있습니다:

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