メインコンテンツへスキップ
ARouter は、単一の統合 API を通じて主要プロバイダーの何百ものモデルへのアクセスを提供します。ARouter ウェブサイト でモデルを閲覧するか、API を直接使用できます。

クエリパラメータ

Models API はクエリパラメータによる結果のフィルタリングをサポートしています。

output_modalities

出力能力でモデルをフィルタリングします。カンマ区切りのモダリティリスト、または "all" を指定してすべてのモデルを含めます。
説明
textテキスト出力を生成するモデル(デフォルト)
image画像を生成するモデル
audio音声出力を生成するモデル
embeddings埋め込みモデル
allすべてのモデルを含める(モダリティフィルタリングをスキップ)
# デフォルト — テキストモデルのみ
curl "https://api.arouter.ai/v1/models" \
  -H "Authorization: Bearer lr_live_xxxx"

# 画像生成モデルのみ
curl "https://api.arouter.ai/v1/models?output_modalities=image" \
  -H "Authorization: Bearer lr_live_xxxx"

# テキストと画像モデル
curl "https://api.arouter.ai/v1/models?output_modalities=text,image" \
  -H "Authorization: Bearer lr_live_xxxx"

# モダリティに関係なくすべてのモデル
curl "https://api.arouter.ai/v1/models?output_modalities=all" \
  -H "Authorization: Bearer lr_live_xxxx"

supported_parameters

サポートする API パラメータでモデルをフィルタリングします。例えば、ツール呼び出しをサポートするモデルを検索する場合:
curl "https://api.arouter.ai/v1/models?supported_parameters=tools" \
  -H "Authorization: Bearer lr_live_xxxx"

モデル一覧

GET /v1/models
API key で利用可能なモデルの完全なリストを返します。
curl https://api.arouter.ai/v1/models \
  -H "Authorization: Bearer lr_live_xxxx"

レスポンス形式

{
  "data": [
    {
      "id": "openai/gpt-5.4",
      "canonical_slug": "openai/gpt-5.4",
      "name": "GPT-5.4",
      "created": 1748000000,
      "description": "OpenAI's flagship multimodal model with state-of-the-art performance.",
      "context_length": 128000,
      "architecture": {
        "input_modalities": ["text", "image"],
        "output_modalities": ["text"],
        "tokenizer": "cl100k_base",
        "instruct_type": "chatml"
      },
      "pricing": {
        "prompt": "0.000005",
        "completion": "0.000015",
        "request": "0",
        "image": "0.00765",
        "web_search": "0",
        "internal_reasoning": "0",
        "input_cache_read": "0.0000025",
        "input_cache_write": "0.000005"
      },
      "top_provider": {
        "context_length": 128000,
        "max_completion_tokens": 16384,
        "is_moderated": true
      },
      "supported_parameters": [
        "tools",
        "tool_choice",
        "max_tokens",
        "temperature",
        "top_p",
        "structured_outputs",
        "response_format",
        "stop",
        "frequency_penalty",
        "presence_penalty",
        "seed"
      ],
      "per_request_limits": null,
      "default_parameters": null,
      "expiration_date": null
    }
  ]
}

モデルオブジェクトスキーマ

data 配列の各モデルには以下のフィールドが含まれます:
フィールド説明
idstringAPI リクエストで使用する一意のモデル識別子(例:"openai/gpt-5.4"
canonical_slugstring変更されないモデルの永続的なスラッグ
namestring人間が読める表示名
creatednumberモデルが ARouter に追加された Unix タイムスタンプ
descriptionstringモデルの機能の詳細な説明
context_lengthnumberトークン単位の最大コンテキストウィンドウサイズ
architectureArchitecture技術的な機能オブジェクト
pricingPricingこのモデルの使用コスト構造(USD/トークン)
top_providerTopProviderプライマリプロバイダーの設定詳細
per_request_limitsobject | nullレート制限情報(制限なしの場合は null
supported_parametersstring[]サポートされる API パラメータの配列
default_parametersobject | nullデフォルトパラメータ値(ない場合は null
expiration_datestring | null廃止日(廃止されていない場合は null

Architecture オブジェクト

{
  "input_modalities": string[],  // 例:["text", "image"]
  "output_modalities": string[], // 例:["text"]
  "tokenizer": string,           // 例:"cl100k_base"
  "instruct_type": string | null // 例:"chatml"、該当しない場合は null
}

Pricing オブジェクト

すべての価格値はUSD/トークンです。"0" は無料を意味します。
{
  "prompt": string,              // 入力トークンあたりのコスト
  "completion": string,          // 出力トークンあたりのコスト
  "request": string,             // API リクエストあたりの固定コスト
  "image": string,               // 画像入力あたりのコスト
  "web_search": string,          // ウェブ検索操作あたりのコスト
  "internal_reasoning": string,  // 内部推論トークンのコスト
  "input_cache_read": string,    // キャッシュされた入力トークン読み取りあたりのコスト
  "input_cache_write": string    // キャッシュされた入力トークン書き込みあたりのコスト
}

Top Provider オブジェクト

{
  "context_length": number,         // プロバイダー固有のコンテキスト制限
  "max_completion_tokens": number,  // レスポンスの最大トークン数
  "is_moderated": boolean           // コンテンツモデレーションが適用されるか
}

サポートされるパラメータ

supported_parameters 配列は、モデルで動作する OpenAI 互換パラメータを一覧表示します:
パラメータ説明
tools関数呼び出し機能
tool_choiceツール選択の制御
max_tokensレスポンス長の制限
temperatureランダム性の制御
top_pニュークリアスサンプリング
reasoning内部推論モード
include_reasoningレスポンスに推論を含める
structured_outputsJSON スキーマの強制
response_format出力形式の指定
stopカスタム停止シーケンス
frequency_penalty繰り返しの削減
presence_penaltyトピックの多様性
seed決定論的な出力

モデルの使用

id をリクエストの model フィールドに直接使用します:
from openai import OpenAI

client = OpenAI(
    base_url="https://api.arouter.ai/v1",
    api_key="lr_live_xxxx",
)

# List available models
models = client.models.list()
for model in models.data:
    print(model.id)

# Use a specific model
response = client.chat.completions.create(
    model="anthropic/claude-sonnet-4.6",
    messages=[{"role": "user", "content": "Hello!"}],
)

サポートされるパラメータによるフィルタリング

ツール呼び出しをサポートするモデルを検索:
curl "https://api.arouter.ai/v1/models?supported_parameters=tools" \
  -H "Authorization: Bearer lr_live_xxxx"
構造化出力をサポートするモデルを検索:
curl "https://api.arouter.ai/v1/models?supported_parameters=structured_outputs" \
  -H "Authorization: Bearer lr_live_xxxx"

自動ルーティング

特定のモデル ID に加えて、ARouter は自動モデル選択をサポートします:
モデル説明
"auto"ARouter がリクエストに最適な利用可能モデルを自動選択
curl https://api.arouter.ai/v1/chat/completions \
  -H "Authorization: Bearer lr_live_xxxx" \
  -H "Content-Type: application/json" \
  -d '{"model": "auto", "messages": [{"role": "user", "content": "Hello!"}]}'
レスポンスの model フィールドには常に実際に使用されたモデルが表示されます。詳細はモデルルーティングを参照してください。

モデルバリアント

任意のモデル ID にサフィックスを追加してルーティング動作を変更できます:
サフィックス効果
:nitro最高スループットのインスタンスにルーティング — 速度最適化
:floor最低コストのインスタンスにルーティング — 価格最適化
:free無料ティアのインスタンスにルーティング(レート制限あり)
:thinking拡張推論 / 思考の連鎖モードを有効化
{"model": "openai/gpt-5.4:nitro"}   // 最速
{"model": "openai/gpt-5.4:floor"}   // 最安値
{"model": "deepseek/deepseek-r1:thinking"} // 推論モード
完全なリファレンスはモデルバリアントを参照してください。

トークン化

モデルによってテキストのトークン化方法が異なります。一部のモデル(GPT、Claude、Llama)はテキストを複数文字のチャンクに分割しますが、他のモデルは文字単位でトークン化します(PaLM)。これは、入力と出力が同一であっても、モデルによってトークン数——したがってコスト——が異なることを意味します。 コストは使用中のモデルのトークナイザーに基づいて請求されます。各レスポンスの usage フィールドを使用して正確なトークン数を取得してください:
{
  "usage": {
    "prompt_tokens": 42,
    "completion_tokens": 128,
    "total_tokens": 170
  }
}

注意事項

  • モデルリストはアカウントで有効なプロバイダーでフィルタリングされます。プロバイダーが有効でない場合、そのモデルは表示されません。
  • 新しいモデルはプロバイダーがリリースすると自動的に追加されます。
  • このリストのモデル ID をチャット補完リクエストの model フィールドに直接使用してください。
利用可能なプロバイダーとそのフラッグシップモデルのキュレーションリストはプロバイダーを参照してください。