---
title: How to generate Google Gemini custom API Key
description: Learn how to create and configure your custom Google Gemini API key for use with VoxWrite. Step-by-step guide with security best practices and troubleshooting tips.
canonical: https://voxwrite.app/docs/google-gemini-api-key
locale: en
---

# How to generate Google Gemini custom API Key

> Markdown twin of https://voxwrite.app/docs/google-gemini-api-key
> Fetch this instead of the HTML page: same content, a fraction of the bytes.
> Site structure and the full page list for agents: https://voxwrite.app/llms.txt

Learn how to create and configure your custom Google Gemini API key for use with VoxWrite. Step-by-step guide with security best practices and troubleshooting tips.

## How to Generate Google Gemini API Key

Learn how to create and configure your custom Google Gemini API key for use with VoxWrite.

## Getting Your API Key

### Step 1: Access Google AI Studio

1. Visit [aistudio.google.com](https://aistudio.google.com)
2. Sign in with your **Google account**
3. If you don't have a Google account, create one first

### Step 2: Generate API Key

1. Click **"Get API Key"** in the left sidebar (or navigate to API Keys section)
2. Click **"Create API Key"**
3. Select an existing Google Cloud project or create a new one
4. **Important**: Copy the key immediately - store it securely!

### Step 3: Add Key to VoxWrite

1. Open VoxWrite settings.
2. Navigate to **"API Keys"** section
  ![VoxWrite API Keys settings panel](https://voxwrite.app/assets/images/docs/voxwrite-api-keys-settings.webp)
3. Paste your Google Gemini API key in the designated field
  ![Input for Google Gemini API Key](https://voxwrite.app/assets/images/docs/gemini-key-image-2.webp)
4. Click **"Save"**

  Google Gemini gives free limited tokens. But for comfortable usage of Gemini's models in VoxWrite, please keep your balance positive.

## API Key Format

Google Gemini API keys follow this format:
```
AIzaSyXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
```

Make sure to copy the entire key including the `AIza` prefix.

## Key Security

### Best Practices

- ✅ **Never share** your API key publicly
- ✅ **Store securely**: Keep it in a password manager
- ✅ **Use unique keys**: Create different keys for different apps
- ✅ **Monitor usage**: Check your Google Cloud Console regularly
- ✅ **Set quotas**: Configure usage limits in Google Cloud

### What to Do If Compromised

1. **Delete immediately**: Remove the compromised key in Google AI Studio
2. **Create new key**: Generate a fresh API key
3. **Update VoxWrite**: Add the new key to your settings
4. **Check billing**: Review your Google Cloud usage for any unusual activity

## Usage & Billing

- Google charges based on tokens used (input + output)
- Pricing varies by model
- Free tier available with limited requests per minute
- View detailed usage in Google Cloud Console

## Troubleshooting

### "Invalid API Key" Error

- Verify you copied the entire key (starts with `AIza`)
- Check for extra spaces or characters
- Ensure the key hasn't been deleted
- Verify the API is enabled in your Google Cloud project
- Try generating a new key

### "Quota Exceeded" Error

- Check your free tier limits
- Wait for the rate limit to reset (usually per minute)
- Consider enabling billing for higher limits
- Upgrade your quota in Google Cloud Console

### Connection Issues

- Check your internet connection
- Verify Google AI services status
- Ensure the Generative Language API is enabled in your project
- Check if you need to enable billing for your project

---

[{"<<"} How to generate custom Anthropic API key](https://voxwrite.app/docs/anthropic-api-key) **|**
How to set up the custom rules {">>"}

## Related

- HTML version of this page: https://voxwrite.app/docs/google-gemini-api-key
- Site map for agents: https://voxwrite.app/llms.txt
