HomeAPIs › Google Gemini

Gemini API — pricing, free tier & how to get a key

Google's Gemini models are fast, multimodal and — crucially — come with a genuinely useful free tier on AI Studio. Here's the pricing, the free limits, and how to get started in two minutes.

Gemini API pricing (reference, June 2026)

ModelInput $/1MOutput $/1MBest for
Gemini 2.5 Pro$1.25$10.00Reasoning, long context
Gemini 2.5 Flash$0.30$2.50Fast, balanced
Gemini 2.0 Flash cheapest$0.10$0.40High volume, cheap
⚠️ Reference prices, June 2026 — confirm on ai.google.dev/pricing. Pro pricing can vary with context length. Output is billed separately and costs more.

The free tier (this is the selling point)

Unlike OpenAI and Anthropic, Google AI Studio gives you a free tier: rate-limited access to Gemini models with no credit card required. It's enough to prototype, build a side project, or run low-volume production. When you outgrow the free limits, you switch to pay-as-you-go via Google Cloud billing — and the paid Flash models are among the cheapest anywhere.

How to get a Gemini API key (step by step)

1. Go to aistudio.google.com and sign in with a Google account.
2. Click Get API key (top-left menu).
3. Click Create API key and pick or create a Google Cloud project.
4. Copy the key. The free tier works immediately — no billing needed.
5. Only add billing when you need higher rate limits or paid models.

Test it:

# replace $GEMINI_API_KEY
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent?key=$GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"hi"}]}]}'

Estimate your cost

Use the AI API Cost Calculator to compare Gemini against GPT and Claude for your token usage and find the cheapest option.

Cheaper / alternative options

Gemini Flash is already one of the cheapest mainstream models. For comparison see GPT-4o mini and Claude Haiku; DeepSeek-V3 is the cheapest of all but without a Google-scale free tier.

FAQ

Does Gemini have a free API tier?

Yes — Google AI Studio offers a rate-limited free tier with no credit card. Enough to prototype and run small projects; higher volume moves to pay-as-you-go.

How do I get a Gemini API key?

Go to aistudio.google.com, click Get API key, create a key in a Google Cloud project, and copy it. Free tier works immediately.

Is Gemini cheaper than GPT-4o?

Gemini Flash is much cheaper than GPT-4o and competitive with GPT-4o mini. Gemini 2.5 Pro is cheaper than GPT-4o on input but similar on output.

Not affiliated with Google. Prices are reference estimates — always verify on the official pricing page.