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

> 複雑なソフトウェア開発や数学・科学の課題向けに Google が開発した推論モデルです。

複雑なソフトウェア開発や数学・科学の課題向けに Google が開発した推論モデルです。

MixRoute の公開カタログには、このモデルの Gemini ネイティブ API と OpenAI 互換 API が掲載されています。利用可否は API キーのグループによって異なります。

## モデル仕様

| 項目 | 内容 |
| - | - |
| モデル ID | `gemini-4-carbon` |
| 入力 | テキスト、画像、動画、音声、PDF |
| 出力 | テキスト |
| コンテキストウィンドウ | 入力と出力で合計 1,048,576 トークン |
| 標準の同期出力上限 | 65,536 トークン |

上記は Google が公開しているモデルの上限です。MixRoute ではルートによって制限が異なる場合があります。Google の長文出力には、以下の例とは別の手順が必要です。

## 使用例

`MIXROUTE_API_KEY` に MixRoute の API キーを設定してください。

### Gemini ネイティブ API

```bash theme={null}
curl --fail-with-body --request POST "https://api.mixroute.ai/v1beta/models/gemini-4-carbon: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-carbon",
    "messages": [{"role": "user", "content": "Reply with OK only."}],
    "max_tokens": 1024
  }'
```

## API リファレンス

* [`POST /v1beta/models/gemini-4-carbon:generateContent`](https://mixroute.ai/docs/ja/api-reference/endpoint/gemini-native)
* [`POST /v1/chat/completions`](https://mixroute.ai/docs/ja/api-reference/endpoint/chat-openai)
* [Google のモデルドキュメント](https://aistudio.google.com/docs/models/gemini-4-carbon)


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