NezhaGate
POST https://nezhagate.com/v1/chat/completions

OpenAI-compatible chat completions backed by Anthropic Claude Opus 5 — adaptive thinking by default, with image input, tool use, prompt caching and streaming. Set model to claude-opus-5. Note: this model deprecates temperature / top_p / top_k upstream; the gateway silently drops them (no error) and sampling runs at the model default. Use reasoning_effort (low / medium / high / xhigh / max) to control thinking depth instead.

📥 컨텍스트 창 (최대 입력):약 200K 토큰.

플레이그라운드에서 사용해 보기 →

인증

Header
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

콘솔에서 API 키를 만들면 시작할 수 있습니다.

요청 본문

파라미터타입필수설명
model string 모델 ID. 여기서는 claude-opus-5입니다.
messages array 메시지 배열. 각 항목은 role(system/user/assistant)과 content를 가집니다. content는 문자열이거나, 이미지 이해(멀티모달 / 비전)를 위한 {type:text}와 {type:image_url} 조각들의 배열일 수 있습니다.
stream boolean 아니오 SSE로 스트리밍할지 여부. 기본값 false.
temperature number 아니오 지원하지 않습니다. 이 모델은 샘플링 파라미터를 폐기했습니다. 게이트웨이가 temperature / top_p / top_k를 오류 없이 조용히 제거하며 샘플링은 모델 기본값으로 동작합니다. 대신 reasoning_effort로 사고 깊이와 속도를 맞바꾸세요.
max_tokens integer 아니오 생성할 최대 토큰 수.
web_search boolean 아니오 true로 두면 웹 검색이 켜집니다. 게이트웨이가 모델이 답하기 전에 실시간 검색 결과로 프롬프트를 보강하고 출처를 함께 제시합니다. tools 항목 {"type":"web_search"}로도 켤 수 있습니다.
reasoning_effort string 아니오 사고 강도: low / medium / high / xhigh / max. 높을수록 더 깊고 느리며 비쌉니다. 사고 토큰은 출력 단가로 usage.completion_tokens 안에 계산됩니다. 생략하면 모델이 적응적으로 정합니다. 게이트웨이가 이 값을 모델 고유의 output_config.effort로 변환하며, 네이티브 Anthropic 엔드포인트에서는 output_config를 직접 보낼 수도 있습니다. 접미사 형태(예: claude-opus-5-high)도 동작하며 과금은 기본 모델과 완전히 같습니다.

요청 예시

cURL
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "claude-opus-5", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'

응답

200 · JSON
{
  "id": "chatcmpl_xxx",
  "object": "chat.completion",
  "model": "claude-opus-5",
  "choices": [
    {"index": 0, "message": {"role": "assistant", "content": "Hello!"}, "finish_reason": "stop"}
  ],
  "usage": {"prompt_tokens": 11, "completion_tokens": 7, "total_tokens": 18}
}

이미지 입력 (Vision)

메시지 content 배열에 이미지를 넣으면 모델이 이를 분석합니다(시각적 질의응답, 텍스트 판독 / OCR 등). image_url에는 공개 이미지 링크 또는 인라인 base64 data URL(data:image/png;base64,...)을 넣을 수 있습니다. 멀티모달 모델(gpt-5.5, gemini 계열 등)에서 사용할 수 있습니다.

curl · 이미지 입력 (Vision)
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "claude-opus-5", "messages": [{"role": "user", "content": [{"type": "text", "text": "이 사진에는 무엇이 있나요?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}]}]}'

오류 코드

Code설명
401API 키가 없거나 유효하지 않음
402잔액 부족 또는 키 한도 초과
400지원하지 않는 모델 또는 파라미터
429업스트림 요청 한도 초과
502모든 업스트림 경로가 실패