Set up OpenRouter
Configure an OpenRouter provider in Aperture so your team can access models from multiple LLM providers through a single API. OpenRouter aggregates models from providers like Google, Meta, and others, including open-source models.
Your client and selected provider must support the same API format. Refer to Supported providers and clients for available setup options and requirements.
Prerequisites
Before you begin, you need:
- An Aperture gateway accessible from your device. Refer to get started with Aperture if you have not set this up.
- An OpenRouter API key.
Configure the provider
Add OpenRouter as a provider in your Aperture configuration:
{
"providers": {
"openrouter": {
"baseurl": "https://openrouter.ai/api/",
"apikey": "<your-openrouter-key>",
"models": [
"qwen/qwen3-235b-a22b-2507",
"google/gemini-2.5-pro-preview",
"x-ai/grok-code-fast-1"
],
"compatibility": {
"openai_chat": true,
"openai_responses": true,
"anthropic_messages": true
}
}
}
}
OpenRouter uses bearer authorization. The configuration enables OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages, matching the Aperture OpenRouter preset. Select a client back end and an OpenRouter model that support the API you intend to use. Enabling a flag does not make every model available through every API.
Model names on OpenRouter use a provider/model prefix format. Browse the OpenRouter model directory to find available model names. Refer to the compatibility flags reference for the full list of flags.
Verify the provider
The best way to verify a connection to a specific model is to send a test request through the Models tab of the Aperture dashboard.
- Open the Aperture dashboard and select the Models tab.
- Find the model you want to test in the list of configured models. If the model is not listed, check your provider configuration and ensure the model name is correct.
- Select the Play icon to the left of the model name to send a test request. If the request succeeds, the icon changes to a green check mark. If it fails, the icon changes to a red "X".
This sends a request from your web browser to the tailnet to verify that Aperture can successfully route requests to the model through the configured provider and that your user account has the necessary permissions to access the model.
Next steps
- Grant model access: Control which models each user or group can access through Aperture.
- Set up the chat UI: Let users talk to your configured models from their browser.
- Set up LLM clients: Connect coding tools to route requests through Aperture.