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

# OpenRouter

# OpenRouter

OpenRouter cung cấp một **API hợp nhất** giúp định tuyến yêu cầu đến nhiều mô hình thông qua một endpoint và API key duy nhất. Nó tương thích với OpenAI, vì vậy hầu hết các SDK của OpenAI có thể hoạt động bằng cách thay đổi URL cơ bản.

## Thiết lập CLI

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

## Đoạn cấu hình

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

## Ghi chú

* Tham chiếu mô hình là `openrouter/<provider>/<model>`.
* Để biết thêm các tùy chọn mô hình/nhà cung cấp, xem tại [/concepts/model-providers](/concepts/model-providers).
* OpenRouter sử dụng Bearer token với API key của bạn trong nền.
