vibehowto

Home / Passwords & API keys / API keys, one company at a time / Gemini API key

Gemini API key

Updated Sep 18, 2026

Google AI Studio, one key, GEMINI_API_KEY in .env. Not a Cloud billing saga unless you outgrow Studio.

You will leave with GEMINI_API_KEY in .env and in Vercel. For a first app, use Google AI Studio, not a full GCP project with twelve IAM roles.

Step 1: AI Studio

Go to aistudio.google.com/apikey. Sign in with a Google account.

Step 2: Create API key

Create API key. If it asks for a Google Cloud project, accept the default it offers for Studio. Copy the key once.

Step 3: Name it

.env.example:

Terminal
GEMINI_API_KEY=

.env:

Terminal
GEMINI_API_KEY=your-real-key

Some libraries want GOOGLE_API_KEY instead. Pick one name, put it in .env.example, and tell the agent that name. Do not invent both.

Vercel → same name → Production → redeploy.

OpenAI instead? OpenAI API key.

Checklist

Saved in this browser. No account. Clearing site data wipes it.

Next: OpenAI API key · Claude API key

Get new guides and videos by email

One email when something new is up. No spam. Unsubscribe anytime.