Skip to main content
OpenRouter is a unified API that provides access to hundreds of models from providers like Anthropic, Google, Meta, Mistral, and more through a single endpoint.
Even though OpenRouter is a built-in provider, it still requires you to bring your own key because you can’t pay for it with credits at this time.

Setup

1

Create an access key

Follow the quickstart to create an access key in app.ngrok.ai.
2

Store your OpenRouter API key

Create an account at openrouter.ai and generate an API key from your dashboard. Then add a provider key.
3

Create a configuration

Create an access key configuration with an openrouter routing rule and allow OpenRouter in the access scope.
4

Assign and send requests

Assign the configuration to your access key and send requests with your access key:

Model names

Always prefix OpenRouter model IDs with openrouter:. Without the prefix, the gateway may route to the native provider instead of OpenRouter.
OpenRouter uses a provider/model format for its model IDs. When calling through the ngrok AI Gateway, prefix with openrouter:: The openrouter: prefix tells the gateway to route to OpenRouter specifically. Without it, a slash-separated ID such as anthropic/claude-sonnet-4-6 resolves to the native catalog model, and the gateway sends it to the native provider first. For the full list of models OpenRouter supports, see openrouter.ai/models.

Available models

See the model catalog.

Next steps