OpenAI-compatible chat completions. Supports streaming (stream), multi-turn chat and structured tasks. Switch models by changing the model field. This model also returns a reasoning summary: choices[].message.reasoning_content when non-streaming, choices[].delta.reasoning_content when streaming. The answer itself stays in content and is never mixed with the reasoning, so clients that only read content need no changes. When reasoning_effort is omitted the gateway requests the medium tier (the model's own default) and the summary comes back all the same. Billing: thinking tokens are charged at the output rate and are included in usage.completion_tokens; usage.completion_tokens_details.reasoning_tokens breaks out how many were reasoning -- those tokens are billed whether or not you read the field. Note that OpenAI exposes only a summary of the reasoning, never the raw chain of thought, so this field is usually short. Note: this model is served over a ChatGPT-subscription upstream that does not accept temperature / top_p / max_tokens / max_completion_tokens / frequency_penalty / presence_penalty -- sending them is silently ignored (no error). Use reasoning_effort for thinking depth and prompt wording for length. For image input use a base64 data: URI; a public image URL may time out upstream.
📥 컨텍스트 창 (최대 입력):약 272K 토큰(GPT-5 제품군 컨텍스트 창. 시스템 프롬프트 등 부가 입력도 이 창에 포함됩니다).
플레이그라운드에서 사용해 보기 →인증
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
콘솔에서 API 키를 만들면 시작할 수 있습니다.
요청 본문
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| model | string | 예 | 모델 ID. gpt-5.5여야 합니다. |
| messages | array | 예 | 메시지 배열. 각 항목은 role(system/user/assistant)과 content를 가집니다. content는 문자열이거나, 이미지 이해(멀티모달 / 비전)를 위한 {type:text}와 {type:image_url} 조각들의 배열일 수 있습니다. |
| stream | boolean | 아니오 | SSE로 스트리밍할지 여부. 기본값 false. |
| reasoning_effort | string | 아니오 | 추론 강도: low / medium / high / xhigh — 사고 깊이와 속도를 맞바꿉니다. 강도가 낮을수록 응답이 빠릅니다. 생략하면 게이트웨이가 모델 자체의 기본값인 medium을 요청합니다. |
| web_search | boolean | 아니오 | true로 두면 웹 검색이 켜집니다. 게이트웨이가 모델이 답하기 전에 실시간 검색 결과로 프롬프트를 보강하고 출처를 함께 제시합니다. tools 항목 {"type":"web_search"}로도 켤 수 있습니다. |
| tools | array | 아니오 | 함수 호출. 표준 OpenAI tools 배열을 넘기세요. 모델이 도구를 호출하기로 하면 finish_reason=tool_calls와 함께 tool_calls를 돌려줍니다. 특정 도구를 강제하려면 tool_choice와 함께 쓰세요. |
| response_format | object | 아니오 | 구조화 출력. {"type":"json_object"}를 넘기면 모델이 유효한 JSON만 돌려줍니다. |
요청 예시
curl https://nezhagate.com/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.5",
"messages": [{"role": "user", "content": "Hello"}],
"stream": false
}'응답
{
"id": "chatcmpl_xxx",
"object": "chat.completion",
"model": "gpt-5.5",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"reasoning_content": "**Weighing the options** ... (a summary of how the model reasoned)",
"content": "Hello!"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 11,
"completion_tokens": 105,
"total_tokens": 116,
"completion_tokens_details": {"reasoning_tokens": 43}
}
}이미지 입력 (Vision)
메시지 content 배열에 이미지를 넣으면 모델이 이를 분석합니다(시각적 질의응답, 텍스트 판독 / OCR 등). image_url에는 공개 이미지 링크 또는 인라인 base64 data URL(data:image/png;base64,...)을 넣을 수 있습니다. 멀티모달 모델(gpt-5.5, gemini 계열 등)에서 사용할 수 있습니다.
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "gpt-5.5", "messages": [{"role": "user", "content": [{"type": "text", "text": "이 사진에는 무엇이 있나요?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}]}]}'오류 코드
| Code | 설명 |
|---|---|
| 401 | API 키가 없거나 유효하지 않음 |
| 402 | 잔액 부족 또는 키 한도 초과 |
| 400 | 지원하지 않는 모델 또는 파라미터 |
| 429 | 업스트림 요청 한도 초과 |
| 502 | 모든 업스트림 경로가 실패 |