Home โ€บ APIs โ€บ 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, July 2026)

ModelInput $/1MOutput $/1MBest for
Gemini 3.1 Pro$2.00$12.00Top reasoning, long context
Gemini 3.1 Flash$0.10$0.40Fast, balanced default
Gemini 3.1 Flash-Lite cheapest$0.05$0.20Highest volume, cheapest
Gemini 2.5 Pro$1.25$10.00Previous-gen reasoning
Gemini 2.5 Flash$0.15$0.60Previous-gen workhorse
โš ๏ธ Reference prices, July 2026 โ€” confirm on ai.google.dev/pricing. Pro pricing can vary with context length. Output is billed separately and costs more. ยท Report outdated price โ†’
โœ“ Last verified: 2026-07-15ยท Source: official provider pricing pageยท Auto-monitored โ€” report change โ†’

โ†’ Estimate your paid-tier bill (and whether the free tier covers you) with the Gemini API cost calculator, or compare every provider on the full AI API cost calculator.

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.

Host your project:DigitalOcean โ€” $200 free โ†—Hostinger VPS
Search & ScrapingCloud & DevCompare 300+ AI Model PricesLLM Latency & Response Time CalculatorVector DB Storage Cost Calculator

Exchanges

BybitBinanceOKXKuCoinBitgetGate.ioMEXC

Tools & Hosting

๐Ÿ“ˆ TradingView๐Ÿ”’ NordVPN๐Ÿ’ณ RevolutDigitalOcean $200Hostinger