Even though OpenRouter is a built-in provider, it still requires you to bring your own key because ngrok.ai inference is not available for it at this time.
Setup
Create an access key
Follow the quickstart to create an access key in app.ngrok.ai.
Store your OpenRouter API key
Create an account at openrouter.ai and generate an API key from your dashboard. Then add a provider key.
Create a configuration
Create an access key configuration with an
openrouter routing rule and allow OpenRouter in the access scope.Model names
OpenRouter uses aprovider/model format for its model IDs. When calling through the ngrok AI Gateway, prefix with openrouter::
| What you want | Model string to use |
|---|---|
| Anthropic Claude via OpenRouter | openrouter:anthropic/claude-3.5-sonnet |
| Google Gemini via OpenRouter | openrouter:google/gemini-2.0-flash-001 |
| Meta Llama via OpenRouter | openrouter:meta-llama/llama-3.1-8b-instruct |
| Mistral via OpenRouter | openrouter:mistralai/mistral-7b-instruct |
openrouter: prefix tells the gateway to route to OpenRouter specifically, not to the native provider. Without it, anthropic/claude-3.5-sonnet would fail—the gateway doesn’t recognize the slash-separated format as a valid model without the provider prefix.
For the full list of models OpenRouter supports, see openrouter.ai/models.
Available models
See the model catalog.Next steps
- Provider Keys
- Access Key Configurations
- Multi-provider failover: failover patterns
- Choose a model: model IDs and provider prefixes