Skip to content
Agents tracked: 492 Releases (7d): 545 Agent status: 1 with issuesSince last limit reset: Claude 9d · Codex 7d For AI agents: Markdown Updated Nov 20, 2026

Gemini API

by Google

Google AI models for text, files and media.

Model hosting and inference

WebsitePricingGitHub

1. Price

“5,000 free search requests per month (shared across all Gemini 3 and newer models), then $14 per 1,000 requests”

Free tier: Free tier with rate limits on some models (not Gemini 4 Argon). As reported on the official pricing page, checked Oct 22, 2026.

ai.google.dev/gemini-api/docs/pricing

Checked against the maker's official pages, pricing on Oct 22, 2026. Tap a verdict to see its source.How we checkedReport an error

What Gemini API does

The Gemini API lets your app send a question, a document, a photo, a recording or a video to Google's Gemini models and get an answer back. It writes and summarizes text, reads files and media, can check facts with Google Search, and also makes images, video and music. There is a free tier with limits; paid use is billed by the amount of text processed.

  • Gemini API is one of 41 APIs in the Model hosting and inference category on AgentGid.
  • It is one of 13 that can be started for free.
  • 6 of them ship an official MCP server; Gemini API does not.
  • Its official SDK is the 2nd most downloaded in the category (72.1M a week).

What people build with it

Answers with fresh web facts

Let a help bot or research tool answer with current information from Google Search, and show the links it used.

Pull details out of PDFs

Upload contracts, invoices or reports and get back the facts you need, such as dates, names and totals.

Summaries of audio recordings

Turn a meeting recording or a podcast episode into a written transcript, a summary, or answers to your questions.

Find moments in videos

Ask what happens in a video and where, for example to tag clips in a video library or write short descriptions.

Filled forms from free text

Turn a customer's message or a pasted recipe into neat fields your app can save, such as name, items and time.

Product descriptions for a shop Idea

Draft short descriptions for each item in an online shop from a few notes, then edit them before publishing.

Gemini API popularity

70M
SDK downloads a week
+12.6% on the 4-week average
1,715
GitHub stars, googleapis/js-genai
SDK downloads per weeknpm @google/genai, pypi google-genai 70,007,441

SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026.

Pricing

Free tier

Free tier with rate limits on some models (not Gemini 4 Argon)

Cheapest plan

No monthly plan

Usage price

Paid tier billed per 1M tokens by model (prepaid or pay-as-you-go)

What one action costs

ActionPrice
1M input tokens, Gemini 3.8 Flash (through December 31, 2026)$0.75
1M output tokens, Gemini 3.8 Flash (through December 31, 2026)$3.75
1M input tokens, Gemini 3.5 Flash-Lite (text, image, video, audio)$0.30
1,000 Google Search grounding requests after 5,000 free a month (Gemini 3+)$14

As reported on the official pricing page, checked Oct 22, 2026. Prices change: confirm before you buy. ai.google.dev/gemini-api/docs/pricing

Limits

All tiers

Limits count per project (requests per minute, input tokens per minute, requests per day); daily limits reset at midnight Pacific time.

All tiers

Exact limits per model and tier are shown only in Google AI Studio.

Tier 1 (billing linked)

$10 of spend per rolling 10 minutes

Batch

100 concurrent batch requests, 2GB input file, 20GB file storage

From the official docs. aistudio.google.com/docs/rate-limits

Key and access

How it signs in

API key in the x-goog-api-key header (the official packages read it from the environment)

Environment variable
GEMINI_API_KEY
Safe in browser code
No, keep it on your server
Card at sign-up

No

Steps only a person can do

  • Sign in to Google AI Studio and copy or create a Gemini API key. Put it in .env as GEMINI_API_KEY (kept out of git); the official packages read it automatically.
  • For production, for users in the EEA, Switzerland or the UK, or for Gemini 4 Argon, set up billing and prepay at least $5. No code change; the same key moves to paid limits.
  • If AI Studio shows "Verification needed", verify the account with a phone or set up billing. Retry the request after the project status changes.

Commercial use and your data

It is a paid online service from Google with a free tier, not open source. It is meant for business use by adults, and Google does not claim ownership of what it generates. Apps for users in Europe or the UK must use the paid tier.

In a paid app
With conditions

Allowed for professional or business use by adults; not in apps aimed at under-18s, and apps for users in the EEA, Switzerland or the UK must use the paid tier.

“Use of Google AI Studio and Gemini API is for developers building with Google AI models for professional or business purposes, not for consumer use.” source

In monetized videos
With conditions

Google does not claim ownership of generated content, but may generate similar content for others; you are responsible for how you use it.

“You're responsible for your use of generated content, and for the use of that content by anyone you share it with.” source

To train your own AI
No

You may not use the service to build models that compete with Gemini, or extract its data or weights.

“You may not use the Services to develop models that compete with the Services (e.g., Gemini API or Google AI Studio).” source

client-work
With conditions

Fine as business use; for medical advice or clinical practice it is not allowed.

“You may not use the Services in clinical practice, to provide medical advice, or in any manner that is overseen by or requires clearance or approval from a medical device regulatory agency.” source

Trains on what you send

“Google uses the content you submit to the Services and any generated responses to provide, improve, and develop Google products and services and machine learning technologies”

Keeps your data

Paid tier prompts and answers are logged for a limited time to detect misuse; Google Search grounding data is kept 30 days.

“For Paid Services, Google logs prompts and responses for a limited period of time, solely for detecting and preventing violations of the Prohibited Use Policy” source

Where data is stored

Only in listed countries; data may be stored or cached in any country where Google has facilities.

“This data may be stored transiently or cached in any country in which Google or its agents maintain facilities.” source

Errors to handle

401 authentication

The API key is missing, invalid, or expired.

Check the key in GEMINI_API_KEY; do not retry.

402 payment_required

The prepaid credit balance is used up.

Top up credits or turn on auto-reload; do not retry until credits are added.

403 permission_denied

The key lacks permission, or the project is restricted, needs verification, or needs billing changes.

Check the project status in AI Studio (verification, billing, leaked key) and fix it there.

429 rate_limit_exceeded / quota_exceeded

Too many requests or tokens per minute, or the daily quota is used up.

Retry with exponential backoff; for the daily quota wait for the reset or ask for an increase.

503 service_unavailable

The service is temporarily overloaded or down.

Retry with exponential backoff.

Use it from an agent

Our agent check

2 of 6: llms.txt no, OpenAPI no, SDK yes, MCP no, status page no, AI assistants allowed yes

Checked Nov 13, 2026.

MCP server

Gemini Docs MCP server (documentation search only; it does not call models)

claude mcp add --transport http geminiDocs https://gemini-api-docs-mcp.dev

npm
npm install @google/genai
PyPI
pip install google-genai

Instructions in its docs to check first

The docs say

“Building with an AI coding agent? Install the skill and then paste the prompt to get started with the Gemini API using Interactions:”

Ask the person first. The suggested command is npx skills add google-gemini/gemini-skills (an unpinned package) and it changes the agent's setup.

The docs say

“curl -fsSL https://raw.githubusercontent.com/google-gemini/gemini-api-cli/main/scripts/install.sh | bash”

Never run it on your own; it pipes a script from the internet into the shell. Ask the person, and prefer the pinned google-genai package in the project.

The docs say

“npx skills add google-gemini/gemini-skills --skill gemini-api-dev --global”

Ask the person first; it installs skills globally from an unpinned source.

Alternatives

Gemini API This page

Free planFree tier

OpenAI API

Pick the OpenAI API when you want GPT models for text, vision, tool calling and agents, also priced per 1M tokens.

from $0.1No free tier

Groq (LLM inference)

Pick Groq when you want fast answers from open models such as GPT-OSS and Llama.

from $0.075No free tier

Mistral AI API

Pick Mistral when you want Mistral's open-weight and commercial models from one provider.

from $0.5 per million input tokensNo free tier

All model hosting and inference APIs

Get started

Tell your AI assistant

“Add Gemini to my app with the google-genai package and the Interactions API: call it from the server with GEMINI_API_KEY from .env, use model gemini-3.8-flash, and never put the key in browser code.”

  1. Get a Gemini API key in Google AI Studio (new users get a project and key automatically) and set it as an environment variable.

    export GEMINI_API_KEY="YOUR_API_KEY"

    From aistudio.google.com/docs/get-started

  2. Install the official Google GenAI package for Python or JavaScript.

    pip install -U google-genai
    npm install @google/genai

    From aistudio.google.com/docs/libraries

  3. Make the first request with the Interactions API and print the answer.

    from google import genai
    client = genai.Client()
    interaction = client.interactions.create(
     model="gemini-3.8-flash",
     input="Explain how AI works in a few words"
    )
    print(interaction.output_text)

    From aistudio.google.com/docs/get-started

First request

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-3.8-flash",
 "input": "Explain how AI works in a few words"
 }'

Mistakes to avoid

Writing code with the old google-generativeai package or gemini-1.5 model names.
Use the google-genai (Python) or @google/genai (JavaScript) package and a current model name such as gemini-3.8-flash.

Coding assistants learned older names; the docs warn they suggest deprecated models and packages.

Putting GEMINI_API_KEY into front-end or mobile app code.
Keep the key on your server and let the page call your own server route.

A key in client code can be read and used by anyone, on your bill.

Setting temperature, top_p or top_k for Gemini 3.6+ and Gemini 4 models.
Leave these settings out; lower the thinking level instead if you need faster or cheaper answers.

These models ignore the values, send deprecation warnings, and will return 400 errors in a future release.

Retrying every failed request in a loop.
Retry only 429, 408 and 5xx errors with exponential backoff and jitter; fix the key, credits or request on 400, 402 and 403.

Client errors mean a bad key, empty prepaid credit or bad syntax, and will fail again.

Installing @google/genai 3.x on Node.js 20.
Use Node.js 22 or later, or pin an older major version of the package.

Version 3.0.0 requires Node.js 22.

Questions

Is there a free tier?

Yes. New accounts start on the free tier, which covers certain models up to their free limits. The top model, Gemini 4 Argon, is not included.

Does Google train on what I send?

On the free tier, yes, it may use your content to improve its products. On the paid tier it does not.

Can I put the key in my web page?

No. The docs say keys in web or mobile apps can be extracted; call Gemini from your own server instead.

Are my rate limits per key?

No, per project, so several keys in one project share the same limits. Daily limits reset at midnight Pacific time.