Skip to the programs
startupcredits.fyi

How to get a Gemini API key: free tier, limits and billing

Get a free Gemini API key in Google AI Studio in a few minutes. Which models are free, rate limits, data use, paid tier setup ($5 minimum) and key security.

You get a Gemini API key for free in Google AI Studio at aistudio.google.com/api-keys. New users get a Google Cloud project and an API key created automatically when they accept the terms, and that key works on the free tier with no credit card.

The free key covers Gemini 4 Hydrogen and the Flash and Flash-Lite models. To use Gemini 4 Carbon, Gemini 4 Neon or Gemini 3.1 Pro Preview, or to stop Google using your prompts to improve its products, you link a billing account and prepay at least $5. Everything below is from Google's own docs as of December 4, 2026.

How to get a Gemini API key, step by step

  1. Sign in to Google AI Studio with a Google account. You must be 18 or older, and you must be in one of the available regions.
  2. Accept the terms. If you are new to Google Cloud, AI Studio creates a default project and an API key for you. If you already use Google Cloud, it does not create one; go to Dashboard, then Projects, click Import projects and pick the project you want.
  3. Open the API keys page and click Create API key. Choose the project the key belongs to. Every key is tied to a Google Cloud project, which holds billing, quota and permissions.
  4. Copy the key and store it as an environment variable. Google's client libraries read GEMINI_API_KEY or GOOGLE_API_KEY automatically. If both are set, GOOGLE_API_KEY wins.
  5. Verify the project if asked. Some free tier projects (extra projects, or ones created outside AI Studio) return 403 FREE_TIER_VERIFICATION_REQUIRED until you scan a QR code with an Android phone or an iPhone. No phone number is shared. Paid projects skip this step.
  6. Send a test request (below).

If the Create API key button is greyed out with "You do not have permission to create a key in this project", your Google Workspace or Cloud admin has to grant key creation permissions, or you can create a project that is not attached to an organization.

Test your key

Google's quickstart uses the Interactions API and Gemini 4 Hydrogen, which is on the free tier:

pip install -U google-genai
export GEMINI_API_KEY="your_key_here"
from google import genai

client = genai.Client()

interaction = client.interactions.create(
    model="gemini-4-hydrogen",
    input="Explain how AI works in a few words"
)
print(interaction.output_text)

Or with curl:

curl -X POST "https://generativelanguage.googleapis.com/v1beta/interactions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H 'Content-Type: application/json' \
  -H "Api-Revision: 2026-05-20" \
  -d '{"model": "gemini-4-hydrogen", "input": "Explain how AI works in a few words"}'

Is a Gemini API key free?

Yes. Creating a key costs nothing, and Google AI Studio itself is free to use in every available region. Usage on the free tier is free too, but only on certain models:

Free tierPaid tier only
Gemini 4 HydrogenGemini 4 Carbon
Gemini 3.8 Flash, Gemini 3.6 FlashGemini 4 Neon
Gemini 3.5 Flash-Lite, Gemini 3.1 Flash-LiteGemini 3.1 Pro Preview
Gemini 3 Flash Preview, Gemini 2.5 Flash-LiteNano Banana image models
Gemma 4, Gemini Embedding, Gemini Embedding 2Gemini Omni video, Genie 4, Lyria
Live, TTS and Transcribe modelsGemini 2.5 Pro Preview TTS

For per-token prices on the paid side, see our Gemini API pricing guide.

Free tier vs paid tier

Free tierPaid tier
Cost$0Per-token pricing, prepaid
ModelsList aboveAll models
Your promptsUsed to improve Google products; human reviewers may read themNot used to improve products
Batch API (50% off)Not available on most modelsAvailable
Grounding with Google Search500 requests per day on Gemini 2.5 Flash and Flash-Lite; not on Gemini 3 and newer5,000 free searches a month across Gemini 3 and newer, then $14 per 1,000
Phone verificationRequired on some projectsNot required
Monthly spend capNone$250 on Tier 1, rising with tier

How to switch to the paid tier

On the AI Studio Projects or API keys page, click Set up billing next to the project. You pick or create a Cloud Billing account, add a payment method, then usually prepay a minimum of $5. Some accounts are offered postpay (billed monthly) instead.

What to know about prepay:

  • One purchase can be $5 to $5,000. Purchased credits expire after 12 months and are not refundable, except when you switch to postpay.
  • When the balance hits $0, every key in every project on that billing account stops working and returns HTTP 402 until you top up. Turn on auto-reload and set a monthly auto-charge limit.
  • To go back to the free tier, disable billing on the project.

Gemini API rate limits on the free tier

Google no longer publishes a public table of free tier limits for each text model. Your exact limits are shown on the rate limit page in AI Studio, and the official rate limits doc explains how they work. What Google does publish:

  • Limits are measured in requests per minute, input tokens per minute and requests per day. Going over any one of them returns a rate limit error.
  • Limits apply per project, not per API key. More keys in the same project do not add quota.
  • Requests per day reset at midnight Pacific time.
  • Experimental and preview models have tighter limits.
  • A few models have published free numbers: Gemini 4 Live gets 65,000 tokens per minute, Gemini 4 Live Translate 20,000, and Gemini Decision 1 gets 200 requests per minute, 50,000 tokens per minute and 10,000 requests per day. Gemini Omni Flash and Genie 4 are not supported on the free tier.

Paid limits rise with your usage tier, which depends on spend on the linked billing account:

TierHow you qualifyMonthly spend cap
FreeActive project or free trialN/A
Tier 1Link an active billing account$250
Tier 2$100 paid and 3 days since first payment$2,000
Tier 3$1,000 paid and 30 days since first payment$20,000 to $100,000+

Tier 1 accounts also have a spend-based limit of $10 per rolling 10 minutes, and Tiers 2 and 3 have $200.

What Google does with your data on the free tier

This is the biggest difference between the tiers, and it matters if you send customer data. Google's Gemini API terms say that on unpaid services, including AI Studio and the free API quota, Google uses your prompts and responses to provide, improve and develop its products and machine learning technologies. Human reviewers may read and annotate API input and output after it is disconnected from your account, key and project. Google tells you not to submit sensitive, confidential or personal information.

On the paid tier, Google does not use prompts or responses to improve its products. It logs them for a limited period only to detect abuse and meet legal requirements.

Two regional rules:

  • In the European Economic Area, Switzerland and the UK, the paid data terms apply to everything, including the free tier.
  • If your app serves users in those regions, the terms say you may only use paid services for it.

How to keep your Gemini API key safe

Treat the key like a password. Anyone who has it can spend your quota and run up charges on your billing account.

  • Auth keys are now the default. Since May 28, 2026, every new key created in AI Studio is an authorization key bound to a service account and restricted to the Gemini API. Google says these get fast enforcement when a leak is detected.
  • Unrestricted old keys stop working. The Gemini API rejects unrestricted standard keys, and since May 7, 2026 it blocks unrestricted keys that have been dormant for a long time. If you have an old key marked Unrestricted, either restrict it to the Gemini API in AI Studio or create a new key.
  • Never put the key in a browser or mobile app. Anyone can extract it from client-side code. Call Gemini from your backend instead.
  • Never commit it to Git. Use environment variables locally and a secret store such as Google Cloud Secret Manager in production.
  • Restrict by IP in the Google Cloud console credentials page if your servers have fixed addresses.
  • Cap spend. Set a monthly spend cap per project on the AI Studio Spend page and billing alerts in the Cloud console.

If a key leaks: create a replacement, deploy it, then disable the old key in the Cloud console, and check usage in AI Studio and billing reports for anything you did not run.

Do not use "free Gemini API keys" posted on forums, GitHub or key-sharing sites. They belong to someone else's billing account, they get revoked, and anything you send through them lands in a stranger's project. Our free LLM API guide lists the legitimate free tiers instead.

Do Google Cloud credits cover the Gemini API?

Some do, some do not.

  • The $300 Google Cloud Welcome credit does not. Since March 2026, Gemini API and AI Studio usage is excluded from the Google Cloud Free Trial. If you opened your billing account after March 2, 2026, you can spend the $300 on other Google Cloud products only. More on that in our Google Cloud free tier guide.
  • Google for Startups Cloud Program credits do. Google says program credits "cover Google's state-of-the-art models like Gemini and Gemma", while third-party models in Model Garden or Marketplace are not covered. The Start tier gives up to $2,000 for startups founded in the last 24 months with a working MVP. The Scale tiers give up to $200,000, or up to $350,000 for AI-first startups, and need institutional funding. See the full rules on our Google for Startups Cloud page and our Google Cloud credits guide.

One catch for prepay accounts in AI Studio: you must buy prepaid credits before any eligible Google Cloud credits apply to Gemini API usage. Once you have a positive prepay balance, eligible Cloud credits are used first. If the prepay balance hits $0, Cloud credits stop being used too, so keep a small balance with auto-reload switched on.

  1. Google CloudGoogle for Startups Cloud ProgramUp to $350,000 in Google Cloud credits over two years (AI startups); up to $200,000 for other startupsNeeds an investor$350K

If you also call other model APIs, these AI programs accept startups without an investor referral:

  1. DaytonaDaytona for Startups"$10K straight away on their account and easily up to $100K" in Daytona creditsApply directly$100K
  2. DeepgramDeepgram for StartupsUp to $100,000 in Deepgram credits over 12 months; direct applicants start at $1,000Apply directly$100K
  3. PyAIPyAI for StartupsUp to $100,000 in voice AI product credits for 12 monthsApply directly$100K
  4. SpeechmaticsSpeechmatics Startup ProgramUp to $50,000 in Speechmatics usage creditsApply directly$50K
  5. Together AITogether AI Startup AcceleratorUp to $15K / $30K / $50K in free platform credits plus 3–10 hours of forward-deployed engineering, by amount raisedApply directly$50K
  6. FirecrawlFirecrawl for Startups2x your annual plan's monthly credits for 12 months, extra credits capped at $2,500 a month or $30,000 a year, plus a Slack Connect channelApply directly$30K

Questions

How many Gemini API keys can I create?

You can create a maximum of 10 projects at a time from the Google AI Studio Projects page, and the API keys page shows up to 100 keys and 50 projects. Rate limits apply per project, not per key, so extra keys in the same project do not give you more free quota.

Can I use Gemini 4 Carbon or Gemini 4 Neon with a free API key?

No. Google lists Gemini 4 Carbon, Gemini 4 Neon and Gemini 3.1 Pro Preview as not available on the free tier. Gemini 4 Hydrogen and the Flash and Flash-Lite models are free.

Why does my new Gemini API key return a 403 error?

The most common cause is FREE_TIER_VERIFICATION_REQUIRED. Some free tier projects must be verified by scanning a QR code with an Android phone or iPhone. Creating a new key in the same project does not get around it, but setting up billing does.

Does the Google Cloud $300 free trial pay for Gemini API usage?

No. Google says the $300 Welcome credit cannot be used for the Gemini API or AI Studio if you opened your billing account after March 2, 2026. Older accounts can spend remaining welcome credit on Gemini until it expires.

Will I be charged for using Google AI Studio after I set up billing?

Only when you use a paid key. Google says AI Studio stays free unless you link a paid API key, and then usage with that key is billed. You can switch between free and paid projects by choosing the matching key.

Programs in this guide

  1. Google CloudGoogle for Startups Cloud ProgramUp to $350,000 in Google Cloud credits over two years (AI startups); up to $200,000 for other startupsNeeds an investor$350K
  2. xAI (SpaceX Super Intelligence)Grok for StartupsCredits across Grok, Grok Build, Grok Bot and the Grok API from one balance; initial credits on approval with more unlocked after onboarding (amount not published)Apply directlyUnpublished
  3. Together AITogether AI Startup AcceleratorUp to $15K / $30K / $50K in free platform credits plus 3–10 hours of forward-deployed engineering, by amount raisedApply directly$50K

Sources