Alibaba Cloud Qwen3.7 Max를 기반으로 한 OpenAI 호환 채팅 완성 API입니다. 추론, 코딩, 에이전트에 강한 Qwen 3.7 세대 플래그십입니다. 항상 먼저 생각하며 추론 과정은 message.reasoning_content로 반환되고, 추론 토큰은 usage.completion_tokens 안에서 출력 단가로 과금되며, max_tokens는 추론 부분을 제한하지 않습니다. 도구 호출, 스트리밍, 프롬프트 캐싱을 지원합니다. model을 qwen3.7-max로 지정하세요. /v1/chat/completions에서만 제공됩니다.
플레이그라운드에서 사용해 보기 →인증
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
콘솔에서 API 키를 만들면 시작할 수 있습니다.
요청 본문
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| model | string | 예 | 모델 ID. 여기서는 qwen3.7-max입니다. |
| messages | array | 예 | 메시지 배열. 각 항목은 role(system/user/assistant)과 content를 가집니다. content는 문자열이거나, 이미지 이해(멀티모달 / 비전)를 위한 {type:text}와 {type:image_url} 조각들의 배열일 수 있습니다. |
| stream | boolean | 아니오 | SSE로 스트리밍할지 여부. 기본값 false. |
| temperature | number | 아니오 | 샘플링 온도, 0–2. |
| max_tokens | integer | 아니오 | 생성할 최대 토큰 수. |
| web_search | boolean | 아니오 | true로 두면 웹 검색이 켜집니다. 게이트웨이가 모델이 답하기 전에 실시간 검색 결과로 프롬프트를 보강하고 출처를 함께 제시합니다. tools 항목 {"type":"web_search"}로도 켤 수 있습니다. |
요청 예시
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "qwen3.7-max", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'응답
{
"id": "chatcmpl_xxx",
"object": "chat.completion",
"model": "qwen3.7-max",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"reasoning_content": "The user is greeting me, so a short friendly reply fits...",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 9,
"completion_tokens": 42,
"total_tokens": 51,
"completion_tokens_details": {"reasoning_tokens": 31}
}
}이미지 입력 (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": "qwen3.7-max", "messages": [{"role": "user", "content": [{"type": "text", "text": "이 사진에는 무엇이 있나요?"}, {"type": "image_url", "image_url": {"url": "https://example.com/photo.jpg"}}]}]}'오류 코드
모든 오류 본문에는 error.message / error.type / error.code / error.param이 들어 있습니다. 분기는 code로 하세요. 전체 목록은 연동 가이드에 있습니다.
| HTTP | code | 설명 |
|---|---|---|
| 401 | invalid_api_key | API 키가 없거나 유효하지 않음 |
| 402 | insufficient_quota | 잔액 부족 또는 키 한도 초과 |
| 400 | invalid_request | 지원하지 않는 모델 또는 파라미터 |
| 429 | rate_limit_exceeded | 업스트림 요청 한도 초과 |
| 502 | upstream_error | 모든 업스트림 경로가 실패 |