Skip to main content

Getting Your Google Gemini API Key

This guide will help you obtain an API key for Google's Gemini AI models to use with EZ Testing.

Prerequisites

  • Google account
  • Web browser
  • Access to Google AI Studio (available in supported regions)

Step-by-Step Instructions

1. Access Google AI Studio

  1. Navigate to Google AI Studio
  2. Sign in with your Google account
  3. Accept the terms of service if prompted

[Image placeholder: Google AI Studio landing page]

2. Create a New Project (if needed)

If you don't have an existing Google Cloud project:

  1. Click "Create new project" or use the project selector
  2. Enter a project name (e.g., "EZ Testing Integration")
  3. Wait for the project to be created

[Image placeholder: Google Cloud project creation]

3. Generate Your API Key

  1. In Google AI Studio, click "Get API key" or "Create API key"
  2. Choose to create an API key in your existing project or create a new one
  3. Click "Create API key in new project" or "Create API key in existing project"
  4. Your API key will be generated and displayed

[Image placeholder: Gemini API key generation page]

4. Copy and Secure Your API Key

  1. Click the copy button next to your API key
  2. Store it securely (password manager recommended)
  3. Important: Keep this key private and secure
warning

Treat your API key like a password. Don't share it publicly or include it in client-side code.

5. Enable the Generative AI API (if required)

If you encounter permission issues:

  1. Go to the Google Cloud Console
  2. Select your project
  3. Navigate to APIs & Services > Library
  4. Search for "Generative Language API" or "AI Platform API"
  5. Click Enable

[Image placeholder: Google Cloud API enablement page]

Configuration in EZ Testing

To configure Gemini in EZ Testing:

  1. Open EZ Testing settings
  2. Go to LLM Configuration or API Settings
  3. Select Google Gemini as your provider
  4. Enter your API key
  5. Choose your preferred Gemini model:
    • gemini-pro (text-only)
    • gemini-pro-vision (text and images)
    • gemini-1.5-pro (latest model)

Available Models

Google Gemini offers several models:

ModelDescriptionUse Case
gemini-1.5-proLatest and most capableComplex reasoning, coding
gemini-1.5-flashFast and efficientQuick responses, simple tasks
gemini-proStable production modelGeneral-purpose applications

Usage Limits and Pricing

Free Tier

  • Limited requests per minute
  • Good for testing and development
  • Check current limits in Google AI Studio
  • Higher rate limits
  • Production-ready quotas
  • Pay-per-use pricing model

Visit the Google AI Pricing page for current rates.

Troubleshooting

Common Issues

"API key not valid" error

  • Verify the API key was copied correctly
  • Ensure the Generative Language API is enabled
  • Check that your Google Cloud project is active

"Permission denied" error

  • Enable the Generative Language API in Google Cloud Console
  • Verify your Google account has proper permissions
  • Check if your region is supported

"Quota exceeded" error

  • Review your usage in Google AI Studio
  • Consider upgrading to paid tier
  • Wait for quota reset (if on free tier)

Regional Availability

Gemini API may not be available in all regions. If you encounter access issues:

  • Check the supported regions list
  • Consider using a VPN if necessary
  • Contact Google Support for region-specific questions

Testing Your Integration

After configuration:

  1. Send a test prompt through EZ Testing
  2. Verify the response is generated correctly
  3. Check for any error messages in the logs
  4. Monitor your usage in Google AI Studio

Next Steps

Additional Resources