Community translations by veiseule.ai — Help improve them on Crowdin
Skip to main content

OpenRouter

OpenRouter cung cấp một API hợp nhất định tuyến các yêu cầu tới nhiều mô hình phía sau một endpoint and API key. It is OpenAI-compatible, so most OpenAI SDKs work by switching the base URL.

Thiết lập CLI

openclaw onboard --auth-choice apiKey --token-provider openrouter --token "$OPENROUTER_API_KEY"

Đoạn cấu hình

{
  env: { OPENROUTER_API_KEY: "sk-or-..." },
  agents: {
    defaults: {
      model: { primary: "openrouter/anthropic/claude-sonnet-4-5" },
    },
  },
}

Ghi chú

  • Tham chiếu mô hình là openrouter/<provider>/<model>.
  • Để biết thêm tùy chọn mô hình/nhà cung cấp, xem /concepts/model-providers.
  • OpenRouter sử dụng Bearer token với khóa API của bạn ở phía dưới.