How to create an OpenRouter API key to use in Ozeki AI Gateway
This guide demonstrates how to create an OpenRouter API key and configure it in Ozeki AI Gateway. You'll learn how to access the OpenRouter platform, generate a new API key with usage limits, and set up OpenRouter as a provider in your gateway. By following these steps, you can connect your Ozeki AI Gateway to multiple AI models through OpenRouter's unified interface.
API URL: https://openrouter.ai/api/v1 Example API Key: sk-or-12345... Default model: gpt-5.2
What is OpenRouter?
OpenRouter is a unified API gateway that provides access to multiple large language models through a single, standardized interface. Instead of managing separate API keys and integrations for different AI providers, OpenRouter allows you to access models from OpenAI, Anthropic, Google, Meta, and many others through one consistent API. When configured with Ozeki AI Gateway, OpenRouter gives your users access to a wide variety of AI models through a single provider connection.
Steps to follow
We assume Ozeki AI Gateway is already installed on your system. You can install it on Linux, Windows or Mac.
- Navigate to OpenRouter website
- Create a new API key
- Configure key
- Generate and copy the key
- Open Providers page in Ozeki AI Gateway
- Create provider
How to Create OpenRouter API key video
The following video shows how to create an OpenRouter API key and configure it in Ozeki AI Gateway step-by-step. The video covers accessing the OpenRouter platform, generating a new API key, and setting up OpenRouter as a provider in your gateway.
Step 1 - Navigate to OpenRouter website
Navigate to the OpenRouter website. This is the main portal where you can access the OpenRouter dashboard, view available models, and manage your API keys (Figure 1).
Step 2 - Create a new API key
Locate and click the "Get API Key" button. This will direct you to either the login page or the API key management dashboard if you're already logged in. If you don't have an account yet, you'll be prompted to create one (Figure 2).
Navigate to the API Keys section and Click the "Create API Key" button to open the configuration dialog (Figure 3).
Step 3 - Configure key
In the API key creation dialog, enter a descriptive name for your API key. Choose a name that helps you identify the purpose or project for this key, such as "Ozeki AI Gateway". Using descriptive names makes it easier to manage multiple keys and track usage across different projects (Figure 4).
OpenRouter allows you to set spending limits on your API keys to prevent unexpected charges. In this step, you can optionally configure credit limits that restrict how much the key can spend. You can also set reset periods (daily, weekly, or monthly) that automatically renew your spending limits (Figure 5).
Configure an expiration date for your API key if necessary. You can choose to have the key expire after a specific amount of time or set it to never expire (Figure 6).
Step 4 - Generate and copy the key
After configuring all the settings, click the "Create" button to generate your new API key. OpenRouter will process your request and create a unique API key with the specified parameters (Figure 7).
Click the "Copy" button to copy the API key to your clipboard (Figure 8). After successfully copying your API key, you can close the API key display window. Once closed, you will not be able to view the full key again through the OpenRouter interface. If you lose your key, you'll need to create a new one.
The API key is shown only once for security reasons. Make sure to copy and securely store the key before closing this window.
Step 5 - Open Providers page in Ozeki AI Gateway
Open the Ozeki AI Gateway web interface and navigate to the Providers page. This is where you'll configure OpenRouter as a new provider using the API key you just created (Figure 9).
Step 6 - Create provider
Click the "New" button to begin the provider creation process. This opens a form where you'll enter the connection details for OpenRouter (Figure 10).
Fill in the provider configuration form with OpenRouter's details. Enter "OpenRouter" as the provider name, select "OpenAI compatible" as the provider type, specify the API endpoint URL, and paste the API key you copied earlier. Select the preferred model from the dropdown list, then click "Create" to save the configuration (Figure 11).
https://openrouter.ai/api/v1
After clicking "Create", the OpenRouter provider is added to Ozeki AI Gateway. The provider now appears in the providers list, confirming that your gateway can route requests to OpenRouter's services. You can now create routes that allow users to access multiple AI models through OpenRouter (Figure 12).
Final thoughts
You have successfully created an OpenRouter API key and configured it as a provider in Ozeki AI Gateway. Your gateway can now communicate with OpenRouter's services and access multiple AI models from different providers through a single unified interface. This setup allows you to manage access to dozens of AI models for multiple users and applications from a single point, making it easy to experiment with different models and optimize for performance and cost.