← 문서 목록

엔드포인트

응답 생성

POST/v1/responses

모델 불러오는 중…

OpenAI Responses 형식으로 요청합니다. 대화를 서버에 저장하는 기능은 없습니다.

  • 추론 강도는 OpenAI 형식 reasoning: {"effort": "low"} 또는 평면 reasoning_effort로 보냅니다. 둘 다 보내면 값이 같아야 하고 다르면 400입니다. reasoning.summary는 받기만 하고 쓰지 않습니다.
  • previous_response_id 같은 대화 저장 필드는 400입니다. 이전 턴은 input에 넣으세요. store는 false만 받습니다.
  • tools, tool_choice, text.format은 Responses 평면 형식과 Chat 형식을 모두 받습니다.
  • 자유 형식 도구("type": "custom")는 모든 모델에서 씁니다. 모델에는 문자열 인자 input 하나를 받는 함수로 전하고, 호출은 custom_tool_call 항목으로 돌려줍니다. format의 문법은 강제하지 못해 설명으로만 전합니다.
  • 도구를 이어 쓸 때는 응답 output 항목을 reasoning까지 그대로 function_call_output(또는 custom_tool_call_output)과 함께 돌려보내세요. Gemini의 도구 서명이 reasoning 항목의 encrypted_content에 있습니다.
  • 도구 결과의 이미지(input_image)는 모든 결과 뒤 user 메시지로 모델에 전합니다. 이미지를 받지 않는 모델은 400입니다.

본문

modelstring필수
모델 ID
inputstring | array필수
문자열, 또는 message / reasoning / function_call / function_call_output / custom_tool_call / custom_tool_call_output 항목 배열
instructionsstring선택
system 지시문
temperaturenumber선택
0–2
top_pnumber선택
0–1
streamboolean선택
토큰 단위 이벤트 스트리밍
backgroundboolean선택
true면 백그라운드 작업으로 제출하고 바로 queued로 응답합니다
tools / tool_choicearray / string|object선택
Chat과 같은 형식, Responses 평면 형식, 자유 형식(custom) 도구
reasoning_effortstring선택
low / medium / high / xhigh / max. 모델에 따라 none, minimal도 받습니다
reasoningobject선택
OpenAI 형식. effort는 reasoning_effort와 같습니다
parallel_tool_callsboolean선택
Chat과 같습니다. true는 기본값이라 생략과 같습니다
textobject선택
format(Chat의 response_format과 같음), verbosity(low/medium/high, GPT 모델만)
prompt_cache_key / safety_identifierstring선택
Chat과 같습니다. prompt_cache_key는 GPT 외 모델에서 경고와 함께 빠집니다
userstring선택
최종 사용자 식별자
everyaisobject선택
everyais 옵션(cache, cache_ttl, parameter_policy)

모델 옵션

모델별 지원값은 GET /v1/models의 capabilities, limits, parameter_constraints에 있습니다. 페이지 위쪽에서 모델을 고르면 표로 보입니다. 지원하지 않는 값은 조정되거나 400이 됩니다(파라미터 정책).

  • reasoning_effort를 생략하면 high를 씁니다. 모델에 high가 없으면 그보다 낮은 가장 가까운 단계를 씁니다. thinking 예산으로 동작하는 모델은 그중 출력 토큰 상한보다 작은 예산의 가장 높은 단계를 씁니다.
  • none은 모델이 지원할 때만 추론을 끕니다.
  • 웹 검색, response_format이 필요하면 Chat을 쓰세요.

GET /v1/responses/{id}

background: true로 제출한 작업을 조회합니다. 대기 코드는 비동기 작업에 있습니다. status는 queued → in_progress → completed / incomplete / failed / cancelled 순서로 바뀌고, 끝나면 Response 전체를 돌려줍니다. 작업이 없거나, 만료됐거나, 다른 키나 사용자의 작업이면 404입니다.

POST /v1/responses/{id}/cancel

queued나 in_progress 작업을 취소하고, 작업에 잡아 둔 크레딧을 돌려줍니다. 이미 끝난 작업은 현재 Response를 그대로 돌려줍니다.

문의접수