Which Gemini API is free? Models, limits, billing and how to call it

The Gemini API has a free tier through Google AI Studio. Which models are free, how billing and limits work, the API URL, web access, and why it can be slow.

Presenting to a room
Presenting to a room

Key takeaways

  • Get a free Gemini API key in Google AI Studio; the free tier covers several models with rate limits.
  • Enable billing for higher limits, the newest models and data that is not used to improve Google's products.
  • The API endpoint is generativelanguage.googleapis.com, and the official google-genai SDK wraps it.
  • Daily request quotas reset at midnight Pacific time; per-minute limits roll continuously.
  • Ground answers with the Google Search tool for current information, and use Flash or lower thinking for speed.

The free Gemini API is the Gemini Developer API used with a key from Google AI Studio: several Gemini models are available on a free tier with rate limits, and you pay only if you enable billing for higher limits or certain models. This page explains what is free and what is paid, the model tiers, why developers choose the Gemini API, how to call it, the API URL, when limits reset, how to give it internet access, and why responses can be slow.

Which Google Gemini API is free?

The Gemini Developer API, accessed with an API key from Google AI Studio, has a free tier. It covers several current models, typically the Flash and Flash-Lite tiers and sometimes Pro, within per-minute and per-day request limits.

To start, sign in to Google AI Studio with a Google account, create an API key, and call the API from your code or test prompts in the Studio interface. The free tier is generous enough for learning, college projects and prototypes. Two conditions matter: limits are low for production traffic, and Google's terms say free-tier prompts and responses may be used to improve its products, so avoid sending sensitive data on the free tier. Vertex AI on Google Cloud is the enterprise route and is billed from the start, often with new-account credits.

Is the Gemini API paid?

It has both. The free tier costs nothing within its limits; the paid tier, enabled by linking a billing account, charges per token for input and output, with much higher rate limits and data that is not used to improve Google's products.

Also asked as: is gemini api paid

Paid usage is billed by tokens processed, with different rates for each model, for long prompts, and for extras such as grounding with search, context caching and media generation. You can set budgets and alerts in Google Cloud billing to avoid surprises. A practical path for students: build and test on the free tier, then enable billing only when you have real users or need higher limits. Check the pricing page for current rates, which change as models are released.

Which Gemini API model is free?

Most current Flash and Flash-Lite models are available on the free tier, and some Pro models have been offered with tight free limits. Image, video and audio generation models and the newest previews may be paid only.

The rate-limits page in the documentation lists, for each model, the free-tier requests per minute, tokens per minute and requests per day, and AI Studio shows your project's current limits. Because Google rotates models, a model that is free today may be replaced or deprecated later, so avoid hard-coding assumptions; read the model name from configuration so you can switch quickly. For most projects, a Flash model is the best free choice: fast, capable and with the most room in its limits.

What are the Gemini API models?

The Gemini API offers model tiers: Flash-Lite for the cheapest, fastest high-volume tasks, Flash for most applications, and Pro for complex reasoning and coding. Specialised models cover embeddings, image generation, speech generation and live audio conversations.

Each generation brings new versions of these tiers, with stable versions for production and preview versions for early access. Many models support thinking, where the model reasons before answering, with settings to control how much. Most accept text, images, audio, video and PDFs as input and support long context windows. The models page lists current names, context limits and capabilities; for embeddings, use the dedicated Gemini embedding model rather than a chat model.

Why use the Gemini API?

Developers choose the Gemini API for a generous free tier, strong multimodal input including video and long audio, very long context windows, built-in grounding with Google Search, and competitive pricing on Flash models.

Also asked as: why use gemini api

Good fits:

  • Apps that analyse PDFs, images, audio or video in one call.
  • High-volume tasks where Flash or Flash-Lite keeps costs low.
  • Answers that need current web information through search grounding.
  • Prototypes, since AI Studio lets you design and export prompts quickly.

Weigh it like any provider: test quality on your own task, check latency from your users' region, and design for switching. In RAG.NextUpgrad I used multi-provider fallback, so one provider's outage or slowdown does not take the product down.

How do I call the Gemini API?

Install Google's official SDK, set your API key as an environment variable, and call generate_content with a model name and your prompt.

Also asked as: how to call gemini api

pip install google-genai
export GEMINI_API_KEY="your-key"
from google import genai

client = genai.Client()   # reads GEMINI_API_KEY
resp = client.models.generate_content(
    model="gemini-2.5-flash",
    contents="Explain retrieval-augmented generation in three sentences.",
)
print(resp.text)

The SDK also supports streaming, chat sessions, file uploads, structured JSON output with a schema, function calling and system instructions. SDKs exist for JavaScript, Go and Java too. Check the models page for the newest model names before you start a project.

What is the Gemini API URL?

The Gemini Developer API base URL is https://generativelanguage.googleapis.com. A typical request goes to /v1beta/models/{model}:generateContent, with your API key in the x-goog-api-key header.

Also asked as: what is gemini api url

A raw HTTP call looks like this:

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" -H "Content-Type: application/json" \
  -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'

Use streamGenerateContent for streaming responses, and the v1 path instead of v1beta when you only need stable features. Vertex AI uses a different, region-based endpoint on Google Cloud with service-account authentication instead of an API key. Never put your API key in front-end code or a mobile app, where anyone can extract it; call the API from your own backend and keep the key in an environment variable.

When does the Gemini API limit reset?

Daily request quotas reset at midnight Pacific time. Per-minute limits on requests and tokens work as rolling windows, so they recover within a minute of easing off.

Also asked as: when does gemini api limit reset

When you exceed a limit, the API returns a 429 error with a resource-exhausted status. Handle it with retries using exponential backoff and jitter, and queue work instead of sending bursts. To avoid hitting limits: cache repeated results, batch work where possible, use smaller models for simple tasks, and enable billing for higher tiers when you have real traffic. AI Studio shows your project's limits and usage, so check there before assuming you are blocked for other reasons.

Can the Gemini API access the internet?

Not by default, but you can enable grounding with Google Search as a tool. The model then searches when needed, answers with current information, and returns citations and search suggestions in the response metadata.

Also asked as: can gemini api access internet

Add the Google Search tool in your request configuration, and the model decides when to search. There is also a URL context tool that lets the model read specific web pages you provide. Grounding adds latency and may have separate pricing and limits, so enable it only for questions that need current information. Display the returned sources to users, both for trust and because Google's terms set requirements for showing search suggestions.

Why is the Gemini API slow?

Responses slow down because of thinking time on reasoning-capable models, long prompts or files, large outputs, search grounding, peak load, or network distance. Each has a fix.

Also asked as: why gemini api is slow

Ways to speed it up:

  • Lower or disable the thinking budget for simple tasks, or use Flash-Lite.
  • Stream responses so users see text immediately.
  • Shorten prompts and send only relevant context; cache repeated long context.
  • Limit the maximum output tokens to what you need.
  • Use grounding only when current information is required.
  • Measure latency per step to find the actual bottleneck.

If slowness is sudden and widespread, check Google's status pages and retry with backoff.

Sources

  1. Google AI for Developers, Gemini API documentationai.google.dev
  2. Google AI for Developers, Gemini modelsai.google.dev
  3. Google AI for Developers, Rate limitsai.google.dev
  4. Google AI for Developers, Grounding with Google Searchai.google.dev
  5. Google AI Studioaistudio.google.com
Pranjul Rathour
Pranjul Rathour
GenAI Engineer · India

GenAI engineer and AI product builder with 2+ years shipping production-grade AI systems: RAG pipelines, fine-tuned LLMs, hybrid retrieval and multi-modal apps across vision, speech and OCR, architected end to end from ingestion to deployment. Leads engineering for SCULT INDIA's 14-member team, founded the 500+ member TechVerse Enclave community and has mentored 200+ students. Three hackathon first prizes: Changethon 2025 (IIT Roorkee), Product Genesis at Vividhotsava 2025 (CSJMU) and BYTEBATTLE (MeetKats).

Open to GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges. For campus sessions the inviting institution covers the visit end to end: travel (a First AC train ticket for journeys up to five hours, a flight for anything longer), accommodation, meals, and pickup and drop; the honorarium and workshop fees are negotiable on WhatsApp or on the call, and requests are welcome from institutions that can cover the visit this way. Email pranjulrathour41@gmail.com.

Keep reading

More on RAG & retrieval

All RAG & retrieval guides →
Campus talks · hackathon judging · mentoring

Want this as a live session at your college?

Open to GenAI roles, hackathon judging, mentorship sessions and guest talks at colleges. For campus sessions the inviting institution covers the visit end to end: travel (a First AC train ticket for journeys up to five hours, a flight for anything longer), accommodation, meals, and pickup and drop; the honorarium and workshop fees are negotiable on WhatsApp or on the call, and requests are welcome from institutions that can cover the visit this way.

Pranjul Rathour, GenAI engineer in India