OpenAI-compatible chat completions backed by the dynamic tier of Gemini 3.6 Flash: no fixed thinking budget — the model decides per request how much to think, which suits mixed workloads of uneven difficulty. Set model to gemini-3.6-flash-tiered. Four tiers, selected by the model name: gemini-3.6-flash (standard, medium thinking budget), -high (most thinking, for multi-step reasoning), -low (least thinking, fastest and cheapest), -tiered (the model picks a budget per request). All four cost the same per token — a bigger thinking budget simply emits more output tokens.
📥 컨텍스트 창 (최대 입력):약 1,000,000 토큰(백만 단위 롱 컨텍스트).
플레이그라운드에서 사용해 보기 →인증
Authorization: Bearer YOUR_API_KEY Content-Type: application/json
콘솔에서 API 키를 만들면 시작할 수 있습니다.
요청 본문
| 파라미터 | 타입 | 필수 | 설명 |
|---|---|---|---|
| model | string | 예 | 모델 ID. 여기서는 gemini-3.6-flash-tiered입니다. |
| 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": "gemini-3.6-flash-tiered", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'응답
{
"id": "chatcmpl_xxx",
"object": "chat.completion",
"model": "gemini-3.6-flash-tiered",
"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 https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "gemini-3.6-flash-tiered", "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 | 모든 업스트림 경로가 실패 |