How to Get a Gemini API Key

This guide will walk you through the process of obtaining an API key from Google's Gemini to use with Reformation AI. With a Gemini API key, you can access models like Gemini 2.5 Pro, Gemini 2.5 Flash, and more.

Step 1: Create a Google AI Studio Account

If you don't already have a Google account, you'll need to create one to access Google AI Studio:

  1. Visit Google AI Studio
  2. Sign in with your Google account or create a new one if needed
  3. Accept the terms of service and privacy policy

Step 2: Create a Google Cloud Project

To use the Gemini API, you'll need to create a Google Cloud project:

  1. Go to the Google Cloud Console
  2. Click on the project dropdown at the top of the page
  3. Click "New Project"
  4. Enter a name for your project (e.g., "Reformation AI")
  5. Click "Create"
  6. Make sure your new project is selected in the project dropdown

Step 3: Enable the Gemini API

Once your project is created, you need to enable the Gemini API:

  1. In the Google Cloud Console, navigate to "APIs & Services" > "Library"
  2. Search for "Gemini API" or "Vertex AI API"
  3. Click on the API in the search results
  4. Click "Enable"
  5. Wait for the API to be enabled

Step 4: Set Up Billing (Required for Full API Access)

Google requires a billing account to be linked to your project for full API access:

  1. In the Google Cloud Console, navigate to "Billing"
  2. Link your project to an existing billing account or create a new one
  3. Add a payment method if prompted
  4. Complete the billing setup process

Google offers a free tier for Gemini API usage, but you'll still need to set up billing for full access. You can set budget alerts to control costs in the Google Cloud Console.

Step 5: Generate an API Key

Now you can generate an API key for the Gemini API:

  1. In the Google Cloud Console, navigate to "APIs & Services" > "Credentials"
  2. Click "Create Credentials" at the top of the page
  3. Select "API key" from the dropdown menu
  4. Your new API key will be displayed. Copy it immediately
  5. (Optional but recommended) Click "Restrict key" to limit which APIs can use this key

Important: Your API key is sensitive information. Never share it publicly or commit it to version control. Consider restricting your API key to only the Gemini API and setting appropriate quotas.

Step 6: Add Your API Key to Reformation AI

Now that you have your Gemini API key, you can add it to Reformation AI:

  1. Log in to your Reformation AI account
  2. Navigate to the Settings page
  3. Find the "API Keys" section
  4. Click on "Add Gemini API Key"
  5. Paste your API key into the field
  6. Click "Save"

Once your API key is added, you'll be able to select and use Gemini models in the chat interface.

Gemini Pricing Information

Google offers a free tier for Gemini API usage, with paid usage beyond that. Here's a general overview of the pricing:

ModelInput (per 1M tokens)Output (per 1M tokens)
Gemini 2.5 Pro$7.00$21.00
Gemini 2.5 Flash$0.35$1.05
Gemini 2.0 Flash$0.25$0.75

For the most up-to-date pricing information, visit the Google AI Pricing page .

Troubleshooting

API Key Not Working

  • Ensure you've copied the entire API key correctly
  • Check that you've enabled the correct API in your Google Cloud project
  • Verify that your billing account is properly set up
  • Make sure you haven't reached your quota limits

Rate Limit Errors

  • Google imposes rate limits on API requests
  • If you're encountering rate limit errors, try spacing out your requests
  • You can request quota increases in the Google Cloud Console