Setup guide - Documented by Roo Code
Use OpenRouter in Roo Code
Roo Code has OpenRouter as a built-in API Provider and fetches the full OpenRouter model list automatically. Paste your key and pick a model.
Last verified 6 steps2 official sources
Steps
- Step 1.
Create an OpenRouter API key on the keys page (https://openrouter.ai/keys) and copy it.
- Step 2.
Open Roo Code Settings: click the gear icon in the Roo Code panel.
- Step 3.
Choose "OpenRouter" from the "API Provider" dropdown.
- Step 4.
Paste your OpenRouter API key into the "OpenRouter API Key" field.
- Step 5.
Choose your model from the "Model" dropdown.
- Step 6.
(Optional) To use a custom base URL for the OpenRouter API, check "Use custom base URL" and enter the URL. Most users leave this blank.
Caveats
- Roo Code fetches available models from OpenRouter's API automatically. Its docs list no current model ids.
- Gemini models through OpenRouter need the "Enable Prompt Caching" box checked by hand.
- The docs.roocode.com URL now redirects to roocodeinc.github.io/Roo-Code.
More setup guides
Same tool, other providers
Related reading
- Model Routing Recipes: Practical Config Patterns to Cut AI SpendModel routing recipes with paste-ready OpenRouter and LiteLLM configs for task tiers, fallback chains, cost ceilings and cache-aware routing that cut AI spend.
- OpenRouter Fusion Makes Model Panels Real. Use Them Like Escalation, Not AutopilotOpenRouter Fusion turns multi-model panels into an API feature. Use it as an escalation lane for prompts where a wrong answer is expensive, not as the default.
- OpenRouter in 2026: Review, Setup, and When Model Routing PaysOpenRouter review and setup - one API key for 300+ models with fallbacks and provider routing, what it costs, and when to go direct to a provider instead.
- LLM Routers Compared: LiteLLM vs Portkey vs OpenRouter in 2026LiteLLM vs Portkey vs OpenRouter compared for production AI apps: cost tracking, fallbacks, caching, and load balancing, plus when to use each router.
FAQ
How do I use OpenRouter in Roo Code?
Roo Code has OpenRouter as a built-in API Provider and fetches the full OpenRouter model list automatically. Paste your key and pick a model.
What should I watch out for?
Roo Code fetches available models from OpenRouter's API automatically. Its docs list no current model ids.
Is this an official OpenRouter and Roo Code setup?
Roo Code documents this setup in its own docs. It was last checked against 2 official pages on October 17, 2026.
Sources
Last verified against 2 official pages.
- docs.roocode.comhttps://docs.roocode.com/providers/openrouter
- roocodeinc.github.iohttps://roocodeinc.github.io/Roo-Code/providers/openrouter/
Newsletter
New models, set up the day they ship
One email per week. New model releases, the coding tools that support them and how to wire them up.