How to Get an
OpenRouter API Key

A step-by-step visual guide to access GPT-4, Claude, Gemini, Llama, and 200+ other models

1

Go to OpenRouter Website

Visit openrouter.ai, the leading AI API aggregator that lets you access models from OpenAI, Anthropic, Google, Meta, and more through a single interface.

https://openrouter.ai
🔀

Welcome to OpenRouter

One API key to access 200+ models

Get Started
What is OpenRouter? An API aggregator that unifies access to GPT-4o, Claude Sonnet 4.6, Gemini 2.0, Llama 3.3, Mistral, and hundreds more models. Pay only for what you use with a credit-based system.
2

Sign Up or Sign In

Click "Get Started" or log in. You can use your Google account, GitHub account, or create an OpenRouter account directly.

https://openrouter.ai/auth/signin

Sign In to OpenRouter

Sign in with Google
or
Sign in with GitHub
OpenRouter supports single sign-on (SSO) with Google and GitHub for quick, secure registration.
3

Go to Keys Page

After logging in, navigate to openrouter.ai/keys or click on your profile menu and select "API Keys" from the settings.

https://openrouter.ai/keys
4

Create a New API Key

Click "Create New Key". Give it a name to identify what you'll use it for (e.g., "Development", "Production", "Test"), then click "Create".

https://openrouter.ai/keys

Create New API Key

My Project API Key
For development and testing
Create Key
One API key gives you access to all 300+ models — GPT-4o, Claude Sonnet 4.6, Gemini 2.0, Llama 3.3, Mistral, and more. No need to manage multiple keys!
5

Copy & Save Your Key

Your new API key will be displayed. Copy it immediately and store it securely. Keys start with sk-or-v1-.

sk-or-v1-4a8f5d7e2c9b6a1f3e8d4c2a9b5f7e1d...
🎉

API Key Created!

Your key is ready to use. Start making API calls to any of 200+ models immediately.

Never share your API key publicly. If exposed, delete it immediately and create a new one. Treat it like a password.
OpenRouter uses a credit-based billing system. Add credits via your Billing page, and pay only for what you use. Rates are competitive and vary by model.
6

Buy Credits (Top Up)

OpenRouter uses a prepaid Credits system. API usage is deducted from your balance — you only top up when needed, with no automatic charges.

Go to the Credits Page

After logging in, click your avatar in the top-right and select Credits, or go directly to:

https://openrouter.ai/credits
openrouter.ai/credits
Current Balance
$0.00
0 credits
Select Amount
5 USD
0
Most popular
5
25 USD
Custom amount (min )
Pay with Credit Card →

Payment Methods

💳
Credit / Debit Card
Visa, Mastercard, American Express
Cryptocurrency
USDC, ETH, and other major tokens supported
OpenRouter will never charge you automatically. When your credits run out, API calls return a 402 Payment Required error — just top up when that happens. We recommend starting with –0 to explore, then adding more as needed.

View Usage & Billing

Visit openrouter.ai/activity to see a detailed breakdown of each API call, including model used, tokens consumed, and cost.

Model Tokens Cost
deepseek/deepseek-v4-pro 1,234 $0.0012
anthropic/claude-sonnet-4-5 567 $0.0034
💳

Credits added — you're ready to go!

Credits are available immediately after purchase. Add your API Key to your application and start calling any model available on OpenRouter.

Free Tier & Trial

OpenRouter offers free tier models including Llama 3.2 (1B/3B), Mistral 7B, Gemma 2, and more. You can test the API without adding a payment method. When you're ready, add credits to access paid models like GPT-4o and Claude Sonnet 4.6.

Happy building with OpenRouter! 🔀