# Gemini 3 Pro — /chat/completions

OpenAI 兼容的对话补全接口，承载 Google Gemini 3 Pro 旗舰多模态模型，支持流式输出与超长上下文。只需把 model 设为 gemini-3-pro-preview。

**端点:** `POST https://nezhagate.com/v1/chat/completions`

## 认证
```
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
```

## 请求参数
| 参数 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| `model` | string | 是 | 模型 ID，此处为 gemini-3-pro-preview。 |
| `messages` | array | 是 | 对话消息数组，每项含 role（system/user/assistant）与 content。 |
| `stream` | boolean | 否 | 是否以 SSE 流式返回。默认 false。 |
| `temperature` | number | 否 | 采样温度，0–2，越高越随机。 |
| `max_tokens` | integer | 否 | 最大生成 token 数。 |

## 请求示例
```bash
curl https://nezhagate.com/v1/chat/completions -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" -d '{"model": "gemini-3-pro-preview", "messages": [{"role": "user", "content": "Hello"}], "stream": false}'
```

## 响应示例
```json
{
  "id": "chatcmpl_xxx",
  "object": "chat.completion",
  "model": "gemini-3-pro-preview",
  "choices": [
    {"index": 0, "message": {"role": "assistant", "content": "Hello!"}, "finish_reason": "stop"}
  ],
  "usage": {"prompt_tokens": 11, "completion_tokens": 7, "total_tokens": 18}
}
```