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