How to get a free Gemini API key
Updated · 3 min read
A Gemini API key lets apps use Google's Gemini models under your own Google Cloud project. The key itself is free, and so is using it within Google's free tier, which covers several strong models. No card is needed until you choose to go paid, which makes it the easiest key to start BYOK apps with.
Step by step
- Open Google AI Studio at aistudio.google.com/apikey and sign in with your Google account.
- Create an API key. Every key belongs to a Google Cloud project. New users get a default project; if you already have Cloud projects, import one into AI Studio first.
- Restrict the key to the Gemini API. Google rejects unrestricted standard keys for Gemini, and a restricted key limits the damage if it leaks.
- Copy the key and paste it into the app, usually under Providers → Google or Gemini.
Free tier: what you get
On 2026-10-29, Google listed a free tier for these text models: Gemini 3.8 Flash, 3.6 Flash, 3.5 Flash-Lite, 3.1 Flash-Lite, 3 Flash Preview, 2.5 Pro, 2.5 Flash and 2.5 Flash-Lite, plus the open Gemma 4 and several speech, transcription and embedding models.
Not free: the new flagship Gemini 4 Argon, Gemini 3.1 Pro Preview, Gemini Omni Flash and the image generation models (Nano Banana). If an app picks one of those by default, switch it to Gemini 3.8 Flash (Google's most capable Flash model) or 2.5 Pro.
Free-tier usage is capped by requests per minute, tokens per minute and requests per day. Google shows your exact limits in AI Studio; daily limits reset at midnight Pacific time. Limits apply per project, not per key.
The trade-off is data: on the free tier, Google says your content is used to improve its products for most models. On the paid tier it is not. Use the free tier for experiments and public material, and switch to paid for anything private.
Paid prices
Prices per million tokens on Google's pricing page, 2026-10-29 (standard tier):
| Model | Input | Output |
|---|---|---|
| Gemini 4 Argon | $2.00 | $10.00 (until 2026-11-30; $4.00 / $20.00 from 2026-12-01) |
| Gemini 3.1 Pro Preview | $2.00 | $12.00 (prompts up to 200K tokens) |
| Gemini 3.8 Flash | $0.75 | $3.75 (until 2026-12-31; $1.50 / $7.50 from 2027-01-01) |
| Gemini 3.5 Flash-Lite | $0.30 | $2.50 |
A chat turn of about 2,000 tokens in and 500 out costs roughly $0.003 with 3.8 Flash, $0.010 with 3.1 Pro Preview and $0.009 with Gemini 4 Argon (twice that from December). Batch requests are half price.
To go paid, set up billing in AI Studio and link an active billing account to the project (Tier 1). Higher tiers follow as you spend more.
Keep the key safe
- Never put the key in client-side code of a website or mobile app you publish; Google recommends a backend proxy for that. Pasting it into a desktop app or extension you use yourself is fine.
- Keep keys out of Git and shared documents.
- Add API restrictions and set up billing alerts in Google Cloud once you enable billing.
- One project per purpose if you want separate limits and bills.
Apps that work with your Gemini API key
Gemini through other routes
You can also reach Gemini models through OpenRouter with one key for many providers, or through Google Vertex AI if your company already uses Google Cloud. For other free options, such as Groq's free plan and OpenRouter's free models, see free AI API keys.
Questions
Is the Gemini API free?
Yes, within limits. A Gemini API key from Google AI Studio is free, and several models (including Gemini 3.8 Flash, the Flash-Lite models and 2.5 Pro) have a free tier with per-minute and per-day request limits. The flagship Gemini 4 Argon and Gemini 3.1 Pro Preview have no free tier.
Does Google use my prompts on the free tier?
Google's pricing page says content sent on the free tier is used to improve Google's products for most models; on the paid tier it is not. Don't send confidential material through a free-tier key.
Are rate limits per key?
No. Gemini rate limits apply per Google Cloud project, so several keys in the same project share one limit. Daily limits reset at midnight Pacific time.
How do I move to the paid tier?
Set up billing in Google AI Studio and link an active billing account to the project. Moving from Free to Tier 1 usually takes effect right away.
Sources
Checked against the providers' own documentation on 2026-10-29. Prices and limits change; the links below have the current figures.