This guide shows you how to configure OpenRouter as an external model provider in AI Studio. After setting up this provider, you can use models from OpenRouter’s unified catalog when building agents.
Prerequisites
Before adding OpenRouter models to AI Studio, you need:
AI Studio supports text generation and embedding models from
OpenRouter. Video, audio, and image generation models are not supported.
Get an OpenRouter API key
OpenRouter authenticates requests with a single API key that works across its model catalog. Create one from your OpenRouter account.
Sign up or log in at OpenRouter
Navigate to the API Keys page
Select Create Key
Enter a name for the key (for example, AI Studio integration)
Copy the key, which starts with sk-or-...
For more details, see the OpenRouter quickstart .
Store your API key securely. If a key is compromised, revoke it from the
API Keys page and create a new one.
Add OpenRouter models in AI Studio
After creating your API key, add OpenRouter models to AI Studio.
Navigate to Models & Guardrails > Models in AI Studio
Select + Add model
Select OpenRouter as the provider
Select the model you want to add from the Model name dropdown
Enter a Display name for the model
Provide your credentials using one of the following options:
Select an existing credential set from the Credentials name dropdown
Enter a new Credential name and your OpenRouter API key to save credentials for reuse
Configure team access:
All teams : Anyone with builder access can use the model
Specific teams : Restrict to selected teams
Select Save
Monitor costs
OpenRouter bills usage directly to your OpenRouter account based on the tokens processed by each model. WRITER also charges a 10% pass-through fee on external model usage, paid via credits. AI Studio tracks usage and costs for external models, providing visibility into spending across all your models in one place.
Troubleshoot OpenRouter configuration
Invalid API key error
If you see an “Invalid API key” or “Authentication failed” error:
Verify the API key is copied correctly without extra spaces
Confirm the key starts with sk-or-...
Check that the key is still active on the API Keys page
Ensure your OpenRouter account has sufficient credits
Model not available error
If a model doesn’t appear or returns an error:
Confirm the model is available in the OpenRouter model catalog
Verify your OpenRouter account has access to the model
Check that your account has credits to run the model
Next steps