Providers • TutorialHeader.readTime
OpenRouter
Use OpenRouter in OpenClaw: one API key to access many models.
OpenRouter provides a <strong>unified API</strong>: use the same endpoint and API key to route requests to multiple models. It is OpenAI API compatible, so most OpenAI SDKs work by just switching the base URL.
Tutorial.step
CLI Setup
Bash
openclaw onboard --auth-choice apiKey --token-provider openrouter --token "$OPENROUTER_API_KEY"
Tutorial.step
Config Snippet
Json5
{
env: { OPENROUTER_API_KEY: "sk-or-..." },
agents: {
defaults: {
model: { primary: "openrouter/anthropic/claude-sonnet-4-5" },
},
},
}Tutorial.step
Notes
- Model ref format is '<code className="bg-white/10 px-1.5 py-0.5 rounded text-emerald-300 text-sm">'openrouter/<provider>/<model>'</code>'.
- See '<a href="/concepts/model-providers" className="text-emerald-400 hover:text-emerald-300 transition-colors">'/concepts/model-providers'</a>' for more available models/providers.
- OpenRouter sends requests using your API key as a Bearer token under the hood.