Create Gemini API Key: Guide for WordPress and API Integration with Google AI Studio
This guide explains how you create a Gemini API Key in Google AI Studio and add it to your WordPress plugin.
Short & to the point
- Open Google AI Studio: Go to Google AI Studio and sign in with your Google account.
- Open API Keys page: Click the key icon at the bottom left of the sidebar. This opens the API Keys area.
- Select a project: Choose an existing Google Cloud project or import it via the Projects area.
- Create API Key: Click Create API key. New keys in AI Studio are created as Auth Keys.
- Copy key: Copy the Gemini API Key immediately after creation.
- Paste key in your WordPress plugin: Insert it into a protected backend setting, for example in neo WP AI. Then test the connection with a short request.
Prerequisites before the Google AI Studio API Key
You need a Google account, access to Google AI Studio and a Google Cloud project. For new users Google AI Studio often creates a default project and API Key automatically after accepting the terms. If you already use Google Cloud, existing projects are not always immediately visible in AI Studio. Then you must import the desired projects in the dashboard under Projects.
If the create key button is disabled, IAM permissions are usually missing. Relevant permissions include reading the project, creating API Keys, enabling the Generative Language API, creating the linked service account and binding the service account to the key.
Important for 2026: Google is moving Gemini API Keys from classic standard keys to more secure Auth Keys. New keys in Google AI Studio are automatically created as Auth Keys. Unrestricted standard keys will be gradually blocked for Gemini; old keys should therefore be migrated or restricted.
Step by step: Create Gemini API Key
1. Open the API Keys page in Google AI Studio
Open Google AI Studio and sign in with the Google account that will manage project, billing and permissions. Then click the key icon at the bottom left of the sidebar. This icon opens the API Key area where you select projects and create new Gemini Keys.
If you want to jump right in, you can alternatively open the API Keys page at aistudio.google.com/app/apikey. Using the key icon is helpful if you want to orient yourself in Google AI Studio first.
2. Select or import a project
Use your own project for your application. A separate project context makes billing, limits, monitoring and rotation much clearer later. If you run a Gemini API integration in WordPress, name the project for example after the website or environment, such as example.com production and example.com staging.
3. Create the API Key
Click Create API key. Copy the generated key immediately. Treat it like a password because anyone with the key can make requests under your project, consume quota and incur costs.
Copy the API key immediately because it will not be shown again later.
4. Insert key into your WordPress plugin
Usually you can enter the API key in the WordPress backend in your plugin settings. With neoAI this is done for example via the neo WP Settings → neoAI.
5. Enter connection in the WordPress software
After entering the key the plugin offers a connection test. Use this test to check whether the key is stored correctly and the application can send a request to Gemini. If the test fails, check project, billing, API activation, permissions and rate limits.
Gemini API integration WordPress: what to watch out for?
In WordPress the key is entered in the backend. Custom integrations can for example read the key via wp-config.php or an environment variable.
For client projects it is recommended to use a separate Google AI Studio API Key per website or environment. This lets you document purposes, separate access and rotate keys selectively.
Costs, billing and rate limits
Google AI Studio offers an entry-level free tier. For production use, higher limits, certain models and better privacy options a linked billing account may be necessary. Google distinguishes usage tiers by billing status, payment history and project.
Rate limits are typically enforced by requests per minute, tokens per minute and requests per day. Some models have their own special limits. For a 429 error lower request frequency, shorter contexts or smaller outputs help. For serious use billing alerts and regular usage monitoring are advisable.
Frequently asked questions about the Gemini API Key
Is the Gemini API Key the same as a Google Cloud API Key?
It is linked to a Google Cloud project but is conveniently created for Gemini in Google AI Studio. New AI Studio keys are Auth Keys and thus more tightly bound to Gemini and a service account.
Can an old standard key still be used?
For new integrations a new Auth Key in Google AI Studio is the better choice. Existing standard keys should be migrated or clearly restricted.
Why does a Cloud project not appear in Google AI Studio?
AI Studio does not always automatically show all projects. In the dashboard the project can be imported in the Projects area; afterwards it appears on the API Keys page.