How to get an OpenRouter API key
Updated · 2 min read
OpenRouter is one API, and one key, for hundreds of models from OpenAI, Anthropic, Google, Meta, Mistral, DeepSeek and many others. Apps that accept an OpenRouter key let you switch models from a dropdown without opening an account with every provider. You pay OpenRouter from a single credit balance.
Step by step
- Create an account at openrouter.ai.
- Buy credits on the credits page. OpenRouter adds a small fee to credit purchases (shown at checkout). You can skip this step if you only want free models, but buying at least $10 raises the free-model limit from 50 to 1,000 requests a day.
- Create a key at openrouter.ai/settings/keys. Name it after the app.
- Set a credit limit on the key so one app can never spend your whole balance.
- Paste the key into the app. If the app has no OpenRouter option but accepts a custom OpenAI-compatible provider, use the base URL
https://openrouter.ai/api/v1.
What it costs
Each model has its own per-token price, listed on its OpenRouter model page and generally in line with the original provider's API price. You see the cost of every request in your activity log. Two things are free:
:freemodels. Model IDs ending in:freecost nothing. Limits: 20 requests per minute, and 50 requests per day, or 1,000 per day once you have bought at least $10 of credits in total.- BYOK usage up to an allowance. If you attach your own provider keys (see below), pay-as-you-go accounts get the first $25,000 per month of BYOK usage, measured at list price, without an OpenRouter fee; after that the fee is 5% of the normal OpenRouter price.
Credits can expire one year after purchase, so it is better to top up small amounts often than a large amount once.
OpenRouter BYOK: use your own provider keys
OpenRouter also works the other way around: you can attach keys from providers such as OpenAI, Anthropic, Google Vertex, AWS Bedrock, Azure and Fireworks to your OpenRouter account. Requests to those providers are then billed to your keys, while you keep OpenRouter's single endpoint, routing and fallbacks. This is useful when you have credits or enterprise terms with a provider but want one integration for everything.
Privacy
- OpenRouter logs request metadata (timestamps, model, token counts) but, by default, not prompts or completions. You can opt in to logging for a 1% discount.
- By default it does not route to providers that log or train on your data, unless you turn on the model training setting.
- The underlying provider's own terms still apply to what it receives.
Apps that work with your OpenRouter key

VisitAnythingLLM
Free · macOS, Windows, Linux · Open source
Private AI app for chatting with your documents. Runs local models or connects to OpenAI, Anthropic, Gemini and others with your key.
Works with:OpenAIAzure OpenAIAnthropicGoogle Gemini+9 more





OpenRouter or direct keys?
OpenRouter is the simplest choice if you like trying many models, want free options, or use apps built around it. Direct keys (Claude, OpenAI, Gemini, DeepSeek) make sense when you mainly use one provider, need its newest features on day one, or want its free tier.
Questions
Is OpenRouter free?
Partly. Models whose IDs end in :free cost nothing, with limits of 20 requests per minute and 50 requests per day, or 1,000 per day once you have bought at least $10 of credits. Paid models are billed from your credit balance.
What is OpenRouter BYOK?
You can attach your own provider keys (OpenAI, Anthropic, Google Vertex, AWS Bedrock, Azure and others) to your OpenRouter account. Requests are then billed to those keys. On pay-as-you-go, the first $25,000 per month of BYOK usage (at list price) has no OpenRouter fee; above that OpenRouter charges 5% of the normal price.
Does OpenRouter keep my prompts?
OpenRouter says it logs request metadata (time, model, token counts) but not prompts and completions by default. You can opt in to prompt logging for a 1% discount. It also avoids providers that log or train on data unless you enable that in settings.
Do OpenRouter credits expire?
They can. OpenRouter reserves the right to expire unused credits one year after purchase, so top up in small amounts.
What base URL do apps need?
https://openrouter.ai/api/v1. Apps that accept a custom OpenAI-compatible endpoint can use OpenRouter with that URL and your OpenRouter key.
Sources
Checked against the providers' own documentation on 2026-10-23. Prices and limits change; the links below have the current figures.