> ## 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 Argon

> Gemini 4 Argon：面向复杂编程、数学、科学和多步骤智能体的 Google 推理模型，输入、思考与输出共用 1M token 上下文。

<link rel="alternate" hrefLang="en" href="https://mixroute.ai/docs/model-api/google/gemini-4-argon" />

<link rel="alternate" hrefLang="zh-Hans" href="https://mixroute.ai/docs/zh-hans/model-api/google/gemini-4-argon" />

<link rel="alternate" hrefLang="zh-Hant" href="https://mixroute.ai/docs/zh-hant/model-api/google/gemini-4-argon" />

<link rel="alternate" hrefLang="ja" href="https://mixroute.ai/docs/ja/model-api/google/gemini-4-argon" />

<link rel="alternate" hrefLang="x-default" href="https://mixroute.ai/docs/model-api/google/gemini-4-argon" />

[Gemini 4 Argon](https://ai.google.dev/gemini-api/docs/models/gemini-4-argon) 是 Google 的旗舰推理模型，面向复杂软件工程、数学与科学问题求解，以及多步骤智能体任务。

MixRoute 模型列表中的 `gemini-4-argon` 支持 Gemini 原生接口与 OpenAI 兼容接口。

## 模型规格

| 项目 | 说明 |
| - | - |
| 模型 ID | `gemini-4-argon` |
| 输入 | 文本、图像、视频、音频和 PDF |
| 输出 | 文本；不生成图像或音频 |
| 上下文窗口 | 1,048,576 tokens，由输入、思考和输出共用 |
| 思考级别 | `low`、`medium`（默认）和 `high` |
| 模型能力 | 函数调用与结构化输出 |

## 调用示例

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

### Gemini 原生 API

```bash theme={null}
curl "https://api.mixroute.ai/v1beta/models/gemini-4-argon:generateContent" \
  -H "Authorization: Bearer $MIXROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "contents": [
    {
      "role": "user",
      "parts": [
        {
          "text": "Explain how to safely retry a failed database transaction."
        }
      ]
    }
  ],
  "generationConfig": {
    "maxOutputTokens": 32768,
    "thinkingConfig": {
      "thinkingLevel": "medium"
    }
  }
}'
```

### OpenAI 兼容 Chat Completions

```bash theme={null}
curl "https://api.mixroute.ai/v1/chat/completions" \
  -H "Authorization: Bearer $MIXROUTE_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "model": "gemini-4-argon",
  "messages": [
    {
      "role": "user",
      "content": "Explain how to safely retry a failed database transaction."
    }
  ],
  "max_tokens": 32768
}'
```

## 请求参数

### Gemini 原生 API

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `contents` | array | 是 | 使用 `role` 和 `parts` 组织的对话内容。 |
| `systemInstruction` | object | 否 | 以内容片段表示的系统指令。 |
| `generationConfig.maxOutputTokens` | integer | 否 | 思考和生成文本共用的 token 预算。非流式示例使用 32,768。 |
| `generationConfig.thinkingConfig.thinkingLevel` | string | 否 | `low`、`medium` 或 `high`，默认为 `medium`。 |

### OpenAI 兼容 Chat Completions

| 参数 | 类型 | 必填 | 说明 |
| - | - | - | - |
| `model` | string | 是 | 填写 `gemini-4-argon`。 |
| `messages` | array | 是 | 对话消息数组。 |
| `max_tokens` | integer | 否 | 生成 token 预算，需同时为推理和最终回答留出空间。 |
| `stream` | boolean | 否 | 设为 `true` 时使用 SSE 流式响应。 |

## 接入注意事项

* [GenerateContent 的单次限制](https://ai.google.dev/gemini-api/docs/generate-content/long-decode) 区分直接调用非流式 REST（32,768 tokens）和流式请求（65,536 tokens）。这些是模型提供方的限制，调用时也受 MixRoute 渠道限制约束。

* 1M 上下文不等于单次请求可输出 1M tokens。长输出需要续传机制，Google 的 OpenAI 兼容接口不支持 long decode。本页说明 MixRoute 的标准请求，不代表已提供 Interactions 或续传能力。

* 使用[思考级别](https://ai.google.dev/gemini-api/docs/generate-content/thinking)，不再使用已弃用的 `thinkingBudget`，也不要同时传入两者。原生 `thinkingLevel` 不接受 `minimal`，思考无法关闭。

* 省略 `temperature`、`topP` 和 `topK`（蛇形命名为 `top_p`、`top_k`），Google 会忽略 Argon 的这些采样参数。不支持通过 `cachedContent` 使用显式上下文缓存。

* 过小的输出预算可能全部用于思考，导致回答被截断或为空。需要减少推理开销时，应降低思考级别，不要将 token 上限当作回答长度目标。

可用性和价格取决于 MixRoute 渠道，请查看[模型市场](https://console.mixroute.ai/models)。


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