Skip to main content

OpenRouter

OpenRouter is a unified API gateway that routes requests to 100+ models from providers like Anthropic, OpenAI, Google, Meta, and more. A single API key and a single base URL gives you access to the full catalog, making it easy to experiment with different models without managing multiple credentials.

Requirements

Quickstart

Then set a default model:

Configuration

Environment variable

OpenClaw reads OPENROUTER_API_KEY automatically and enables the openrouter provider.

Config snippet

Provider settings

Model IDs

OpenRouter model references follow the pattern openrouter/<provider>/<model>. Examples:
You can also use openrouter/auto to let OpenRouter pick the best model for each request. The full model list is available at openrouter.ai/models.

Auto routing

The openrouter/auto model lets OpenRouter select the best available model for each request based on capability, cost, and availability. OpenClaw disables the reasoning effort parameter for auto because the target model is unknown at request time.

Troubleshooting

401 Unauthorized
  • Verify your key starts with sk-or- and is copied in full.
  • Re-run onboarding: openclaw onboard --auth-choice openrouter-api-key.
Model not available / 404
  • Check that the model ID matches OpenRouter’s catalog exactly (case-sensitive).
  • Some models require special approval; check your OpenRouter account settings.
Rate limits OpenRouter applies per-model rate limits based on your tier. If you hit limits, add multiple API keys as auth profiles for rotation: openclaw models auth add-key --provider openrouter.