AI Provider Setup · BYOK

Connect Google Gemini

1M-token context from Google AI Studio — Gemini 2.5 Pro, Flash, and Flash-Lite.

Google Gemini 2.5 Pro's 1M-token context window is the largest in the frontier. Good fit when you need to feed it very large inputs in a single call — ad creative libraries, product catalogs, long video transcripts. Keys come from Google AI Studio (not Google Cloud Vertex AI).

Best used for

Key details

Where to generate your key
https://aistudio.google.com/app/apikey
Expected key format
Google AI Studio key — alphanumeric, no prefix
Environment variable name (if self-hosting)
GOOGLE_API_KEY
Provider pricing
https://ai.google.dev/pricing
Official docs
Google AI docs

Step-by-step setup

  1. 1 Sign in to Google AI Studio

    Go to aistudio.google.com and sign in with a Google account. AI Studio is separate from Google Cloud Vertex — do not use the Vertex console.

  2. 2 Enable billing (optional but recommended)

    The free tier has very strict rate limits. Open aistudio.google.com and click Set up billing to upgrade to the paid tier — much higher limits.

  3. 3 Open the API key page

    Navigate to aistudio.google.com/app/apikey. You can create keys scoped to specific Google Cloud projects.

  4. 4 Create an API key

    Click Create API key. Pick a project (or let Google create one) and give it a name. The full key appears immediately.

  5. 5 Copy the key

    You can always re-view Google AI Studio keys later, but copy it now for convenience.

  6. 6 Paste into Admaxxer

    Go to Settings then AI Providers, find the Google Gemini row, paste the key, and click Connect.

  7. 7 Pick a default model

    gemini-2.5-pro is our recommendation — 1M context and best reasoning. Use gemini-2.5-flash or flash-lite for cheap high-volume work.

  8. 8 If the connection test fails

    Make sure the Generative Language API is enabled in your Google Cloud project (AI Studio usually enables it automatically).

Test the connection inside Admaxxer

Once you've pasted your key into /settings/ai-providers, hit Test. Admaxxer makes a single no-cost call against the provider's /v1/models (or equivalent) endpoint and reports back:

Available models

These are the pinned model IDs Admaxxer tests against. The model picker in chat will show these plus any live-catalog entries the provider returns.

Model ID Display name Context Tools Best for
gemini-2.5-pro Gemini 2.5 Pro (recommended) 1000K Yes 1M context, best reasoning in the Gemini family. Default pick.
gemini-2.5-flash Gemini 2.5 Flash 1000K Yes Much cheaper than Pro. Great for classification, summarization, batch work.
gemini-2.5-flash-lite Gemini 2.5 Flash-Lite 1000K Yes Cheapest Gemini tier that still supports tools. Good for light tasks at scale.

Common errors and fixes

401

When it happens: On Connect if the key is wrong or restricted to another referrer.

Fix: Open aistudio.google.com/app/apikey, confirm the key, and remove any HTTP referrer restriction.

429

When it happens: Quickly on the free tier — per-minute and per-day limits are low.

Fix: Enable billing in AI Studio. Paid tier limits are much higher.

403

When it happens: If the Generative Language API is not enabled on the underlying GCP project.

Fix: Open console.cloud.google.com and enable Generative Language API for the project tied to this key.

model_not_found

When it happens: If the model name is stale (Gemini model names change).

Fix: Use gemini-2.5-pro or gemini-2.5-flash. Check ai.google.dev/models for the current list.

safety_filter

When it happens: If a response is blocked by Gemini's content safety filters.

Fix: Rephrase the prompt. Admaxxer surfaces the filter reason — adjust the ad copy or source text accordingly.