Providers / Google Gemini API / AI Studio

AI APIs

Google Gemini API / AI Studio API keys and credentials

What every Google Gemini API / AI Studio credential a founder holds does, whether it expires, and what tends to break. Each fact links to Google Gemini API / AI Studio's own docs.

Last checked 2026-11-06 · aistudio.google.com

At a glance

CredentialExpiryPermissions
Standard Gemini API keyNot documentedCan be scoped
Auth key (service-account-bound Gemini API key)Not documentedCan be scoped
Google account (AI Studio / Google Cloud login)Not documented–

Each credential

Standard Gemini API key

Associates requests with a Google Cloud project for billing and quota, but does not identify the caller. Unrestricted standard keys are rejected by the Gemini API; keys with explicit restrictions still work. Restrict in AI Studio with 'Restrict to Gemini API only', or in Cloud Console (API restrictions and application restrictions such as IP). Restricting requires apikeys.keys.update. Rotation guidance: create a replacement, deploy it, disable the old key only after the new one is verified, then delete. Per the page, from May 7, 2026 the Gemini API blocks unrestricted keys that have been dormant for an extended period (shown with a Blocked tag). Expiry is not described on the page.

Google Gemini API / AI Studio docs

Auth key (service-account-bound Gemini API key)

Bound to a Google Cloud service account, so requests run under that identity. Restricted to the Generative Language API by default and supports fast-acting leaked-key enforcement. All new keys created in AI Studio on or after May 28, 2026 are auth keys. Requests with auth keys are not recorded in Google Cloud service account usage metrics. Expiry not described on the page.

Google Gemini API / AI Studio docs

Google account (AI Studio / Google Cloud login)

Keys are created in AI Studio under the Google account that owns the Cloud project.

Google Gemini API / AI Studio docs

What usually goes wrong

Renewals and billing

Usage is tracked on the AI Studio Usage page; requests that cannot be matched to a named key appear as '(unknown keys)'. Pricing and free tier terms not checked.

What Google Gemini API / AI Studio's docs don't say

We couldn't confirm these from official docs, so don't rely on them either way:

Rotating or replacing a Google Gemini API / AI Studio key

The steps are the same for most providers: make the new key, deploy it everywhere the old one is used, check it works, then revoke the old one. Our guides walk through it:

Sources

Related providers

Keep track of every Google Gemini API / AI Studio key

StackHangar stores your Google Gemini API / AI Studio keys in an encrypted vault, grouped by the product they belong to, warns you before they expire, and walks you through rotating them. We can't read your secrets.