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

# OpenRouter

> OpenRouter 統合 API を OpenClaw から使う設定ガイドです。単一キーで複数 LLM を利用する方法、CLI 認証、モデル指定を確認できます。

OpenRouter は、単一の endpoint と API キーの背後で多数のモデルへリクエストをルーティングする**統合 API**を提供します。OpenAI 互換であるため、多くの OpenAI SDK は base URL を切り替えるだけで利用できます。

## CLI セットアップ

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
openclaw onboard --auth-choice apiKey --token-provider openrouter --token "$OPENROUTER_API_KEY"
```

## 設定例

```json5 theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  env: { OPENROUTER_API_KEY: "sk-or-..." },
  agents: {
    defaults: {
      model: { primary: "openrouter/anthropic/claude-sonnet-4-5" },
    },
  },
}
```

## 注意事項

* モデル参照名は `openrouter/<provider>/<model>` です。
* 利用可能なモデルや provider の詳細は [/concepts/model-providers](/concepts/model-providers) を参照してください。
* OpenRouter では内部的に API キーを Bearer トークンとして使用します。
