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

# プロバイダープロキシ

> ARouter API Key を使用して、サポートされている任意のプロバイダーへのリクエストを直接プロキシします。複数のプロバイダーキーを管理する必要はありません。

ARouter のプロバイダープロキシを使用すると、ARouter API Key を認証として、サポートされている任意のプロバイダーのネイティブ API にリクエストを直接転送できます。プロバイダーごとに個別の API Key を管理する必要はありません。

## エンドポイント

```
POST /{provider}/{path}
GET  /{provider}/{path}
```

`{provider}` はプロバイダースラッグ、`{path}` はプロバイダーのネイティブ API パスです。

## プロバイダープロキシを使用するタイミング

| ユースケース                                             | 推奨アプローチ                                     |
| -------------------------------------------------- | ------------------------------------------- |
| 標準 LLM チャット補完                                      | `provider/model` 形式の `/v1/chat/completions` |
| プロバイダー固有の機能（例：Anthropic Batches、Gemini キャッシュコンテンツ） | `/{provider}/{path}` プロキシ                   |
| ネイティブストリーミング形式                                     | `/{provider}/{path}` プロキシ                   |
| ARouter スキーマにないプロバイダー固有パラメータ                       | `/{provider}/{path}` プロキシ                   |

## サポートされているプロバイダー

| プロバイダー          | スラッグ        | ベース URL                                     |
| --------------- | ----------- | ------------------------------------------- |
| OpenAI          | `openai`    | `https://api.openai.com`                    |
| Anthropic       | `anthropic` | `https://api.anthropic.com`                 |
| Google Gemini   | `google`    | `https://generativelanguage.googleapis.com` |
| DeepSeek        | `deepseek`  | `https://api.deepseek.com`                  |
| xAI             | `xai`       | `https://api.x.ai`                          |
| Kimi (Moonshot) | `kimi`      | `https://api.moonshot.cn`                   |
| MiniMax         | `minimax`   | `https://api.minimax.chat`                  |
| Mistral         | `mistral`   | `https://api.mistral.ai`                    |
| Groq            | `groq`      | `https://api.groq.com`                      |
| Cohere          | `cohere`    | `https://api.cohere.com`                    |
| NVIDIA          | `nvidia`    | `https://integrate.api.nvidia.com`          |
| Dashscope（アリババ） | `dashscope` | `https://dashscope.aliyuncs.com`            |

## 例

### OpenAI — チャット補完

```bash theme={null}
curl https://api.arouter.ai/openai/v1/chat/completions \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-5.4",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

### Anthropic — メッセージ

```bash theme={null}
curl https://api.arouter.ai/anthropic/v1/messages \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4.6",
    "max_tokens": 1024,
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

### Anthropic — メッセージバッチ

```bash theme={null}
# バッチを作成
curl https://api.arouter.ai/anthropic/v1/messages/batches \
  -X POST \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "requests": [
      {
        "custom_id": "request-1",
        "params": {
          "model": "claude-sonnet-4.6",
          "max_tokens": 1024,
          "messages": [{"role": "user", "content": "Hello!"}]
        }
      }
    ]
  }'

# バッチステータスを確認
curl https://api.arouter.ai/anthropic/v1/messages/batches/msgbatch_xxx \
  -H "Authorization: Bearer lr_live_xxxx"
```

### Google Gemini — コンテンツ生成

```bash theme={null}
curl "https://api.arouter.ai/google/v1beta/models/gemini-2.5-flash:generateContent" \
  -X POST \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {"role": "user", "parts": [{"text": "Hello!"}]}
    ]
  }'
```

### Google Gemini — モデル一覧

```bash theme={null}
curl "https://api.arouter.ai/google/v1beta/models" \
  -H "Authorization: Bearer lr_live_xxxx"
```

### DeepSeek — チャット補完

```bash theme={null}
curl https://api.arouter.ai/deepseek/v1/chat/completions \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v3.2",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'
```

## 注意事項

* **認証**: ARouter がプロバイダーの API Key を自動的に注入します。ARouter Key のみが必要です。
* **ネイティブ形式**: リクエストとレスポンスはそのまま転送されます — ARouter は変換を行いません。
* **使用量トラッキング**: Token の使用量は引き続き ARouter アカウントに記録されます。
* **パスパススルー**: `/{provider}/` 以降のすべての内容がそのままプロバイダーに転送されます。

<Tip>
  Anthropic にプロバイダープロキシを使用する場合、`anthropic-version` ヘッダーは自動的に注入されます。含める必要はありません。
</Tip>
