Back to API Keys Guide
🔵Free Tier Available

How to Get a Google Gemini API Key

Step-by-step guide for Gemini Pro, Gemini 1.5, and Gemini 2.0 Flash

3-5 minutes
Free tier included
No credit card required
Free Tier Benefits

Google offers a generous free tier for Gemini API:

  • 15 requests per minute for Gemini 1.5 Flash
  • 1,500 requests per day included
  • No credit card required for free tier

This is enough for dozens of AI ethical assessments without any cost!

Before You Start
  • A Google account (Gmail, Google Workspace, etc.)

That's it! If you have a Google account, you can get started immediately.

Step-by-Step Instructions

1

Go to Google AI Studio

Visit Google AI Studio (formerly MakerSuite):

aistudio.google.com/apikey
2

Sign In with Google

Click "Sign in with Google" and select your Google account. If you're already signed in to Google, this step may be automatic.

3

Accept Terms of Service

Review and accept Google's AI Studio Terms of Service. This includes:

  • Google AI Studio Terms
  • Generative AI Prohibited Use Policy
4

Create Your API Key

  1. Click the "Create API key" button
  2. Choose "Create API key in new project" (or select an existing GCP project)
  3. Your API key will be generated immediately
Project Creation: If you don't have a Google Cloud project, AI Studio will create one for you automatically. This is free.
5

Copy Your API Key

Your API key will look something like this:

AIzaSyAaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPp

Click the copy button to copy it to your clipboard.

Keep it safe! While you can view this key again in AI Studio, it's best practice to store it securely (like a password manager) right away.
Using Your API Key with AI Assess Tech

Now that you have your API key, you can use it with AI Assess Tech:

Option 1: Demo Tool (aiassessmenttool.com)

  1. Go to aiassessmenttool.com
  2. Select "Google Gemini" as your provider
  3. Paste your API key in the API Key field
  4. Choose your model (Gemini 1.5 Flash recommended)
  5. Click "Start Assessment"

Option 2: SDK Integration

import { GoogleGenerativeAI } from '@google/generative-ai';
import { AIAssessClient } from '@aiassesstech/sdk';

const genAI = new GoogleGenerativeAI(process.env.GEMINI_API_KEY!);
const model = genAI.getGenerativeModel({ model: 'gemini-1.5-flash' });

const client = new AIAssessClient({
  healthCheckKey: process.env.AIASSESS_KEY
});

const result = await client.assess(async (question) => {
  const response = await model.generateContent(question);
  return response.response.text();
});
Google Gemini Pricing (as of 2026)
ModelFree TierPaid (per 1M tokens)Est. Cost per Assessment
Gemini 1.5 Flash Recommended15 RPM, 1M tokens/min$0.075 input / $0.30 outputFree*
Gemini 1.5 Pro2 RPM, 32K tokens/min$1.25 input / $5.00 output~$0.08
Gemini 2.0 Flash10 RPM$0.10 input / $0.40 output~$0.01
Gemini Pro60 RPM$0.50 input / $1.50 output~$0.02

*Within free tier limits. Check ai.google.dev/pricing for current rates.

Troubleshooting

"API key not valid" error

Make sure you copied the entire key. Gemini keys start with "AIza". Also verify you're using the right API endpoint for Gemini.

"Quota exceeded" error

You've hit the free tier rate limits. Wait a minute for RPM limits, or wait until the next day for daily limits. Consider enabling billing for higher limits.

"Permission denied" error

Make sure the Generative Language API is enabled in your Google Cloud project. Go to Google Cloud Console to enable it.

Ready to Test Your AI?

Now that you have your Gemini API key, you can run your first AI ethical assessment: