How to Get an OpenRouter API Key

Create an OpenRouter account, open the API Keys page, and manage your key

OpenRouter provides a unified model API across many model providers. Page labels may change over time; follow the current openrouter.ai UI. Never expose your API key or commit it to a public repository.

1. Open OpenRouter and sign up

Go to the OpenRouter website and use the signup or login entry. You can create an account with GitHub, Google, MetaMask, or an email and password.

https://openrouter.ai/

OpenRouter account signup dialog
OpenRouter signup and login entry

2. Click Get API Key

After logging in, return to the homepage or console entry and click Get API Key. This takes you to the page for creating and managing keys used by API calls.

OpenRouter homepage Get API Key button
Click Get API Key to enter the key page

3. Create and manage API keys

On the API Keys page, click New Key to create a key. Copy the full key into your application, environment variables, IDE plugin, or script. OpenRouter is compatible with OpenAI-style APIs; check the official docs for model names and request details.

https://openrouter.ai/settings/keys

OpenRouter API Keys management page
Create and manage keys on the API Keys page
Security tip: Do not put API keys in public repositories, screenshots, or chat messages. If a key may have leaked, revoke it in OpenRouter and create a new one.

Loading comments...