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

# OpenRouter

# OpenRouter

OpenRouter 提供 **統一 API**，可透過單一端點與 API 金鑰，將請求路由至多個模型。它與 OpenAI 相容，因此只要切換基礎 URL，大多數 OpenAI SDK 都能正常運作。 OpenRouter 提供 **統一 API**，可透過單一端點與 API 金鑰，將請求路由至多個模型。它與 OpenAI 相容，因此只要切換基礎 URL，大多數 OpenAI SDK 都能正常運作。 It is OpenAI-compatible, so most OpenAI SDKs work by switching the 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>`。
* 如需更多模型／提供者選項，請參閱 [/concepts/model-providers](/concepts/model-providers)。
* OpenRouter 在底層使用夾帶你的 API 金鑰的 Bearer 權杖。
