GEMINI LABJP
NANOLITE — Nano Banana 2 Lite is here: Google's fastest and most cost-efficient Gemini Image model, made for running lightweight image generation cheaplyOMNIFLASH — Gemini Omni Flash is in public preview, a natively multimodal model that lets enterprises and developers build custom, dynamic video workflowsAGENTS — Managed Agents expand with background: true for async server-side runs and polling, remote MCP server integration, and refreshing credentials across interactionsMEMORY — The Memory Bank IngestEvents API is generally available, decoupling event ingestion from memory generation so you can stream content continuouslyTHROUGHPUT — Provisioned Throughput now lets you submit up to seven pending orders for the same model and regionDEPRECATE — Image generation models shut down on August 17, and the Grok 4.1 family on the Gemini Enterprise Agent Platform on August 20NANOLITE — Nano Banana 2 Lite is here: Google's fastest and most cost-efficient Gemini Image model, made for running lightweight image generation cheaplyOMNIFLASH — Gemini Omni Flash is in public preview, a natively multimodal model that lets enterprises and developers build custom, dynamic video workflowsAGENTS — Managed Agents expand with background: true for async server-side runs and polling, remote MCP server integration, and refreshing credentials across interactionsMEMORY — The Memory Bank IngestEvents API is generally available, decoupling event ingestion from memory generation so you can stream content continuouslyTHROUGHPUT — Provisioned Throughput now lets you submit up to seven pending orders for the same model and regionDEPRECATE — Image generation models shut down on August 17, and the Grok 4.1 family on the Gemini Enterprise Agent Platform on August 20
Articles/API / SDK
API / SDK/2026-04-18Beginner

What You Can Build With the Gemini API Free Tier — Three Starter Projects With Code

A clear-eyed look at the Gemini API free tier limits and what you can actually build without paying anything. Includes three beginner-friendly projects with working Python code.

gemini-api277free-tier2beginner13python104getting-started2

"How much will the Gemini API cost me?" is usually the first question before anyone writes a single line of code.

The short answer: for personal projects, learning, and prototyping, the free tier is enough most of the time. Here's what the limits actually are, and three projects you can build without spending anything.

The Actual Free Tier Numbers

As of April 2026, the Gemini API free tier includes:

Gemini 2.0 Flash (Free Tier):
- RPM (requests per minute): 15
- RPD (requests per day): 1,500
- TPM (tokens per minute): 1,000,000
- Input types: text, images, audio, video
- Context window: 1,048,576 tokens

Gemini 2.5 Pro (Free Tier):
- RPM: 5
- RPD: 25
- TPM: 250,000
- Context window: 1,048,576 tokens

Check the current rate limits page for the latest values — these do change.

In practice: 1,500 requests per day with Gemini 2.0 Flash is plenty for personal projects and learning. You'd have to be systematically hammering the API to hit the daily cap. The 15 RPM limit is the one that bites you if you're looping without any delay, so keep that in mind.

Getting Your API Key

  1. Go to Google AI Studio
  2. Click "Get API key" → "Create API key"
  3. Select a project (or create a new one)
  4. Copy and store the key somewhere safe

No credit card required for the free tier. A Google account is all you need.

Starter Project 1: A Simple Chat Assistant

The most useful first project is one you'll actually interact with.

import google.generativeai as genai
 
# Configure with your API key (use env vars in real projects)
genai.configure(api_key="YOUR_GEMINI_API_KEY")
 
# Flash gives you more free-tier headroom than Pro
model = genai.GenerativeModel("gemini-2.0-flash")
 
# Start a multi-turn chat session
chat = model.start_chat(history=[])
 
print("Gemini Chat (type 'quit' to exit)")
while True:
    user_input = input("You: ")
    if user_input.lower() == "quit":
        break
    
    response = chat.send_message(user_input)
    print(f"Gemini: {response.text}\n")
pip install google-generativeai
python chat.py

Once this works, try adding a system_instruction to give the assistant a persona. Something like "You are a concise technical editor. Rewrite every response to be 30% shorter without losing meaning." suddenly makes this a useful tool.

Starter Project 2: Image Description Tool

Gemini 2.0 Flash is multimodal, which means you can pass in images and ask questions about them.

import google.generativeai as genai
import PIL.Image
 
genai.configure(api_key="YOUR_GEMINI_API_KEY")
model = genai.GenerativeModel("gemini-2.0-flash")
 
# Load a local image
image = PIL.Image.open("sample.jpg")
 
# Ask something about it
response = model.generate_content([
    image,
    "Describe what's in this image in detail. "
    "Note anything unusual or particularly interesting."
])
 
print(response.text)
pip install google-generativeai Pillow

Practical uses: reading receipts, describing food photos, transcribing handwritten notes, or extracting structured data from screenshots. All of this works on the free tier.

As an indie developer, this is the project that mirrors how I actually started. When I added an image-classification feature to one of my own apps, I ran the first few hundred images entirely on the free tier — just to confirm the model's output was reliable enough — before moving the production batch job to a paid plan. Validating "is this good enough?" for free first, rather than paying to experiment, saved me a fair amount of wasted effort.

Starter Project 3: Document Summarizer

This is the one that tends to be most immediately useful for real work.

import google.generativeai as genai
 
genai.configure(api_key="YOUR_GEMINI_API_KEY")
model = genai.GenerativeModel("gemini-2.0-flash")
 
def summarize_file(filepath: str) -> str:
    """Read a text file and return a structured summary."""
    with open(filepath, "r", encoding="utf-8") as f:
        content = f.read()
    
    prompt = f"""Summarize the following document.
 
Format your response as:
1. Overview (3 sentences max)
2. Key points (3-5 bullet points)
3. Action items (if any are implied)
 
---
{content}
"""
    
    response = model.generate_content(prompt)
    return response.text
 
# Example usage
summary = summarize_file("meeting_notes.txt")
print(summary)

The 1M token context window on Gemini 2.0 Flash means you can feed in surprisingly long documents without chunking. A 200-page PDF transcribed to text still fits comfortably.

The Rate Limit Error You'll Probably See

If you loop over a list of inputs without any delay, you'll hit the 429 error eventually.

import time
import google.generativeai as genai
from google.api_core.exceptions import ResourceExhausted
 
model = genai.GenerativeModel("gemini-2.0-flash")
 
def safe_generate(prompt: str, max_retries: int = 3) -> str:
    """Generate content with automatic retry on rate limit errors."""
    for attempt in range(max_retries):
        try:
            response = model.generate_content(prompt)
            return response.text
        except ResourceExhausted:
            wait_seconds = 60 * (attempt + 1)  # 60s, 120s, 180s
            print(f"Rate limited. Waiting {wait_seconds}s before retry...")
            time.sleep(wait_seconds)
    
    raise Exception("Max retries exceeded")

Add this wrapper around any batch processing and you won't need to babysit your scripts.

This is close to the exact backoff I run in my own batch jobs. Because the free tier's RPM ceiling is low, a plain retry-with-delay is usually enough to leave a script running overnight without supervision — far simpler than reaching for elaborate concurrency control before you actually need it.

When to Move to a Paid Plan

The free tier stops being enough at two points: when you're serving real users and 1,500 requests per day isn't close to sufficient, or when you need Gemini 2.5 Pro's reasoning capabilities at scale (the 25 RPD limit on Pro is the real constraint there).

For everything before that point — learning the API, building something for yourself, testing ideas — the free tier is a genuinely useful starting point, not just a demo.

Get the API key, run the chat example, and adjust something to make it your own. You'll have a better sense of what you want to build next within about twenty minutes.

Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

If you found this article helpful, a small tip ($1.50) would mean a lot to us. Your support helps keep this site ad-free and covers server and hosting costs.

Related Articles

API / SDK2026-07-15
Sample what you already accepted — an audit budget that catches silent quality drift
A confidence gate only ever looks at output the model hesitated on. Silent drift sinks into the batch that sailed through. Working from a fixed 30-minutes-a-day review budget, this walks through deriving detection time from the binomial, reallocating the same budget across risk strata, and catching slow decay with a cumulative monitor.
API / SDK2026-07-14
When Gemini's executed result and its prose disagree on a number — a gate that trusts only code_execution_result
Gemini Code Execution returns the value it actually computed and the sentence describing it as separate parts. Trust the prose and you can inherit a hallucinated number. Here is a verification gate, in working code, that extracts the executed result as the single source of truth and rejects prose that disagrees.
API / SDK2026-07-13
When responseSchema Can't Do $ref: Handling Recursive Schemas in Production with responseJsonSchema
Gemini's responseSchema is an OpenAPI subset with no $ref or $defs, so it can't express shared definitions or recursion. Here's how I moved to responseJsonSchema to reuse localized fields and handle a recursive category tree in production.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →