> ## Documentation Index
> Fetch the complete documentation index at: https://mixroute.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini 4 Neon

> Google 面向编程和知识工作的推理模型，侧重端到端处理速度。

Google 面向编程和知识工作的推理模型，侧重端到端处理速度。

MixRoute 公开目录为此模型列出了 Gemini 原生和 OpenAI 兼容接口。实际可用性取决于 API Key 所属分组。

## 模型规格

| 项目 | 说明 |
| - | - |
| 模型 ID | `gemini-4-neon` |
| 输入 | 文本、图像、视频、音频和 PDF |
| 输出 | 文本 |
| 上下文窗口 | 输入与输出共享 1,048,576 个 Token |
| 标准同步输出上限 | 65,536 Token |

上表是 Google 公布的模型限制，MixRoute 路由限制可能不同。Google 的长输出需要单独的调用流程，不适用于以下示例。

## 快速示例

将 `MIXROUTE_API_KEY` 设置为你的 MixRoute API Key。

### Gemini 原生 API

```bash theme={null}
curl --fail-with-body --request POST "https://api.mixroute.ai/v1beta/models/gemini-4-neon:generateContent" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "contents": [{"role": "user", "parts": [{"text": "Reply with OK only."}]}],
    "generationConfig": {"maxOutputTokens": 1024}
  }'
```

### OpenAI 兼容 Chat Completions

```bash theme={null}
curl --fail-with-body --request POST "https://api.mixroute.ai/v1/chat/completions" \
  --header "Authorization: Bearer $MIXROUTE_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini-4-neon",
    "messages": [{"role": "user", "content": "Reply with OK only."}],
    "max_tokens": 1024
  }'
```

## API 参考

* [`POST /v1beta/models/gemini-4-neon:generateContent`](https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/gemini-native)
* [`POST /v1/chat/completions`](https://mixroute.ai/docs/zh-Hans/api-reference/endpoint/chat-openai)
* [Google 模型文档](https://aistudio.google.com/docs/models/gemini-4-neon)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.