How to create a Vertex AI API key to Use in Ozeki AI Gateway
This guide demonstrates how to create a Vertex AI API key and configure it in Ozeki AI Gateway. You'll learn how to access Google AI Studio, generate a new API key for Gemini models, and set up Vertex AI as a provider in your gateway. By following these steps, you can connect your Ozeki AI Gateway to Google's Gemini models and leverage their advanced AI capabilities.
API URL: https://generativelanguage.googleapis.com/v1beta/openai/ Example API Key: abc123... Default model: gemini-2.5-pro
What is a Vertex AI API key?
A Vertex AI API key is a unique authentication credential provided by Google Cloud that allows applications to access Google's Gemini AI models through the Generative Language API. This API key provides access to Google's latest Gemini models including Gemini 2.5 Pro and other advanced language models. When configuring Vertex AI as a provider in Ozeki AI Gateway, you need the API key and the Generative Language API endpoint to establish the connection.
Steps to follow
- Open Google AI Studio
- Create API key
- Enter name and select project
- Create key
- Copy API key
- Open Providers page in Ozeki AI Gateway
- Create provider
How to create a Vertex AI API key video
The following video shows how to create a Vertex AI API key and configure it in Ozeki AI Gateway step-by-step. The video covers accessing Google AI Studio, generating a new API key, and setting up the provider in your gateway.
Step 0 - Install Ozeki AI Gateway
Before configuring Vertex AI as a provider, you need to have Ozeki AI Gateway installed and running on your system. If you haven't installed Ozeki AI Gateway yet, follow our Installation on Linux guide or Installation on Windows guide to complete the initial setup.
Step 1 - Open Google AI Studio
Open your web browser and navigate to Google AI Studio API key page. Sign in or create an account with your Google account credentials. Google AI Studio provides a streamlined interface for managing API keys for Gemini models. This is where you'll create and manage your API keys (Figure 1).
Step 2 - Create API key
On the Google AI Studio API keys page, click the "Create API key" button to begin the key generation process. This initiates the API key creation workflow where you'll configure your new key with a name and associate it with a Google Cloud project (Figure 2).
Step 3 - Enter name and select project
Enter a descriptive name for your API key that identifies its purpose, such as "Ozeki AI Gateway". Select the Google Cloud project you want to associate with this API key from the dropdown menu. If you don't have an existing project, you can create a new one directly from this interface (Figure 3).
Step 4 - Create key
After entering the key details and selecting your project, click the "Create key" button to generate your new API key. Google will create a unique authentication credential that you'll use to connect Ozeki AI Gateway to Gemini models (Figure 4).
Step 5 - Copy API key
After the API key is generated, the key will appear on the dashboard. Click the copy button to copy the API key to your clipboard. Store this key securely as you'll need it to configure Ozeki AI Gateway. The API key provides access to your Google Cloud resources (Figure 5).
Step 6 - 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 Vertex AI as a new provider using the API key you just created (Figure 6).
Step 7 - Create provider
Click the "New" button to begin the provider creation process. This opens a form where you'll enter the connection details (Figure 7).
Fill in the provider configuration form with the AI details. Enter the provider name, select "OpenAI compatible" as the provider type, paste the Generative Language API endpoint URL (https://generativelanguage.googleapis.com/v1beta/openai/), and paste your API key. Select your preferred Gemini model from the dropdown list, then click "Create" to save the configuration (Figure 8).
https://generativelanguage.googleapis.com/v1beta/openai/
After clicking "Create", the AI provider is added to Ozeki AI Gateway. The provider now appears in the providers list, confirming that your gateway can route requests to Google's Gemini models. You can now create routes that allow users to access Gemini models through your gateway (Figure 9).
Conclusion
You have successfully created a Vertex AI API key and configured it as a provider in Ozeki AI Gateway. Your gateway can now communicate with Google's Gemini models including Gemini 2.5 Pro and other advanced AI capabilities. This setup allows you to manage Vertex AI access for multiple users and applications from a single point while leveraging Google's cutting-edge language models.