Responses API
텍스트, 도구 호출, 멀티모달 입력, Codex 클라이언트를 위한 POST /v1/responses.
POST https://api.webway.sh/v1/responses
Codex 및 최신 OpenAI SDK 연동에는 Responses를 사용하세요.
요청
curl https://api.webway.sh/v1/responses \
-H "Authorization: Bearer $WEBWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-5.6-terra",
"input": "Write a three-line release note.",
"max_output_tokens": 200
}'
| 필드 | 타입 | 설명 |
|---|---|---|
model |
string | 필수. 제공업체가 명시된 모델 ID |
input |
string 또는 array | 필수. 텍스트 또는 구조화된 입력 항목 |
instructions |
string | 시스템 수준 지침 |
max_output_tokens |
integer | 생성할 최대 토큰 수 |
tools |
array | 모델이 사용할 수 있는 도구 |
stream |
boolean | true이면 응답 이벤트를 스트리밍 |
응답
{
"id": "resp_01…",
"object": "response",
"model": "openai/gpt-5.6-terra",
"output": [
{
"type": "message",
"role": "assistant",
"content": [{"type": "output_text", "text": "Added…"}]
}
],
"usage": {"input_tokens": 12, "output_tokens": 24, "total_tokens": 36}
}
공식 OpenAI SDK는 합쳐진 텍스트를 response.output_text로 제공합니다.