Integrations

Google Gemini

Connect Google Gemini to generate text, images, and video, analyze documents and media, create embeddings, and run batch and research jobs.

You paste one value into PopMCP: a Gemini API key created in Google AI Studio. Keys made since May 28, 2026 start with AQ., older ones with AIza, and both work.

Setup time
3 min
Auth
API credentials
API base URL
https://generativelanguage.googleapis.com/v1beta
Rate limits
Limits apply per Google Cloud project, not per key, as requests per minute, input tokens per minute and requests per day, and they vary by model and tier (Free, then Tier 1 once billing is linked). Requests per day reset at midnight Pacific time. AI Studio's rate limit page shows your project's current numbers.

Before you begin

  • A Google account that can sign in to Google AI Studio and accept its terms of service
  • A Google Cloud project for the key. New AI Studio users get a default project made for them; if you already use Google Cloud, AI Studio does not create one, so you import a project first
  • Permission to create API keys on that project, such as the Editor role (it includes apikeys.keys.create and iam.serviceAccountApiKeyBindings.create)
  • Billing linked to the project only if you want image generation, Veo video, Pro models or the Batch API. Creating the key is free

Get your credentials

Open the API keys page in Google AI Studio

Sign in at aistudio.google.com with your Google account and accept the terms if asked. Open Dashboard in the left panel and choose API keys, or go straight to the API keys link below.

Open this screen →

aistudio.google.com/apikey
you@example.com
Dashboard / API keys

API keys

Create API key
KeyProjectKey TypeBilling Tier
AQ.…k3RwCreated Mar 4, 2026acme-geminiAuthFree tier

Rate limits belong to the project, not the key, so every key in one project shares them.

Import your Cloud project, if you already use Google Cloud

New AI Studio users already have a default project and can skip this step. Otherwise open Dashboard → Projects, click Import projects, search for the project by name or ID, select it and click Import.

aistudio.google.com
you@example.com
Dashboard / Projects

Projects

Import projects
Search
acme-gemini
acme-gemini
CancelImport

AI Studio shows up to 50 projects and 100 keys on these pages.

Create the API key

Back on API keys, click Create API key. Give the key a name such as PopMCP, choose the project it should belong to, confirm, and copy the new key. If Create API key is unavailable, you lack permission to create keys on that project: ask an admin for the Editor role, or use a project that is not tied to an organisation.

Open this screen →

aistudio.google.com/apikey
you@example.com
Dashboard / API keys

API keys

Create API key
Name
PopMCP
Project
acme-gemini
CancelCreate key

Treat the key like a password. PopMCP stores it encrypted and only uses it server-side.

Set up billing if you need images, video or Pro models

Optional. A free-tier key covers the Flash text models, embeddings and File Search. For image generation, Veo video, Pro models and the Batch API, click Set up billing in the Billing Tier column next to the project, pick or add a Cloud Billing account, and prepay at least $5, or choose a postpay plan if you are offered one.

Open this screen →

aistudio.google.com/apikey
you@example.com
Dashboard / API keys

API keys

KeyProjectKey TypeBilling Tier
PopMCPAQ.…7fQeacme-geminiAuthFree tier
Set up billing

Linking billing moves the project to Tier 1, which also raises its rate limits.

Paste the key into PopMCP

In PopMCP, paste the key into Gemini API key and save. PopMCP lists the models the key can use and runs a free token count to check it, so nothing is billed.

Connect in PopMCP

Open your workspace, choose Google Gemini in the marketplace, and fill in the connect dialog:

FieldWhat to enter
Gemini API keysecretOpen Google AI Studio (aistudio.google.com/apikey), click Create API key, and copy it. Creating a key is free; image, video and Pro models need billing enabled on its project. Stored encrypted and used server-side only.Encrypted with AES-256-GCM on save and never shown again.

PopMCP verifies the credential against Google Gemini immediately. On success the connection flips to Verified and its MCP tools are provisioned.

Verify it worked

PopMCP shows the connection as Connected, labelled Gemini API key followed by the key's last four characters. Ask the AI to list the models the key can use; on a free-tier key, image and Veo models only start working once billing is set up.

Troubleshooting

"Google says this API key is not valid" or "Google did not accept this key"

Why: Part of the key was missed when copying, or the key was deleted. A bad AIza key answers 400 API_KEY_INVALID and a bad AQ. key answers 401.

Fix: Copy the whole key again from the API keys page in AI Studio, or create a new one, and paste only the key with no quotes or spaces.

"Google blocks this key for the Gemini API" (API_KEY_SERVICE_BLOCKED)

Why: It is an older AIza key with no API restrictions. The Gemini API rejects unrestricted standard keys.

Fix: Restrict it with Add restrictions → Restrict to Gemini API only on the API keys page, or create a new key in AI Studio.

"The Gemini API (Generative Language API) is not enabled for this key's Google Cloud project"

Why: The key was made in the Google Cloud console on a project where the Generative Language API is off.

Fix: Enable the Generative Language API on that project, or create the key in Google AI Studio, which turns it on for you.

"Google does not offer the Gemini API free tier in this region"

Why: The free tier is not available where the project is used, so Google answers FAILED_PRECONDITION.

Fix: Click Set up billing for the project in AI Studio, then connect again.

Image, Veo or Pro model calls fail with 403 or 429 while text works

Why: The key's project is on the free tier, which does not cover those models.

Fix: Set up billing for the project in AI Studio. The key stays the same, so there is nothing to change in PopMCP.

429 RESOURCE_EXHAUSTED during a busy run

Why: A requests-per-minute, tokens-per-minute or requests-per-day limit ran out. Limits are per project, so every key in the project shares them, and a spend cap over a rolling 10 minutes can apply on paid tiers.

Fix: Wait and retry; daily counts reset at midnight Pacific time. Check AI Studio's rate limit page for the project's current limits, and link billing to move up a tier.

"This project's prepaid Gemini credits are used up"

Why: The project is on prepaid billing and its balance reached zero.

Fix: Add credit on the AI Studio Billing page, then retry.

Reference

On this page