Gemini API Free Tier: Google AI Studio Limits
Google AI Studio issues a free Gemini API key with no credit card or Cloud Billing account required. Verified on 28 Nov 2026, limits apply per model and per Google Cloud project across RPM, TPM and RPD, resetting at midnight Pacific — with an important privacy trade-off on the unpaid tier.
Google AI Studio Key Facts
- Example model
- gemini-2.5-flash
- Quota scope
- Per model, per Cloud project
- Daily reset
- 00:00 Pacific Time (PT)
- Unpaid data policy
- Prompts may improve Google products
- Official limits
- ai.google.dev/gemini-api/…
Gemini Free Tier vs Paid Tier: Privacy and Quotas
The biggest decision with Google AI Studio is not technical setup — it is data handling. Google's terms treat unpaid free-tier prompts differently from paid Cloud Billing requests, so check this comparison before wiring Gemini into an app that touches user data.
| Policy | Free Tier (No Billing) | Paid Tier (Cloud Billing Linked) |
|---|---|---|
| Credit Card Required | No | Yes (Cloud Billing account) |
| Used to Improve Google Products | Yes — prompts & outputs may be reviewed | No — paid API data is not used for training |
| Quota Structure | Lower per-model RPM, TPM & RPD caps | Significantly higher tiered RPM & TPM |
| Recommended Workload | Public data, prototyping, learning, evals | Customer data, private codebases, production |
What the Gemini Free Tier Supports
- Long-context chat & coding: Ideal for summarizing large documents and multi-file code context on non-sensitive projects.
- Native vision & PDFs: Pass images and documents directly without stitching together a separate OCR pipeline.
- Embeddings & tool calling: Build complete free RAG prototypes and structured JSON function-calling agents from one console.
How Per-Project Quotas Work
- One pool per project: Generating multiple API keys inside the same Google Cloud project does not multiply your RPM or RPD quota.
- HTTP 429 RESOURCE_EXHAUSTED: Returned whenever you exceed a model's RPM, TPM or daily RPD limit.
- Midnight Pacific reset: Daily RPD counters reset at
00:00 PT; check live per-model allowances directly inside Google AI Studio's Rate Limits panel.
Using Gemini With the OpenAI SDK
Google maintains an official OpenAI compatibility endpoint at https://generativelanguage.googleapis.com/v1beta/openai. Pass your GEMINI_API_KEY and a model slug such as gemini-2.5-flash to reuse existing OpenAI SDK code.
Need Gemini-specific features like explicit context caching, File API video/audio uploads or Google Search grounding? Switch to Google's official @google/genai (JS) or google-genai (Python) SDK.
import os
from openai import OpenAI
client = OpenAI(
base_url="https://generativelanguage.googleapis.com/v1beta/openai",
api_key=os.environ["GEMINI_API_KEY"],
)
r = client.chat.completions.create(
model="gemini-2.5-flash",
messages=[{"role": "user", "content": "Hello"}],
)
print(r.choices[0].message.content)import OpenAI from 'openai';
const client = new OpenAI({
baseURL: "https://generativelanguage.googleapis.com/v1beta/openai",
apiKey: process.env.GEMINI_API_KEY,
maxRetries: 0,
});
const r = await client.chat.completions.create({
model: "gemini-2.5-flash",
messages: [{ role: 'user', content: "Hello" }],
});
console.log(r.choices[0].message.content);import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
import { generateText } from 'ai';
const provider = createOpenAICompatible({
name: "google-ai-studio",
baseURL: "https://generativelanguage.googleapis.com/v1beta/openai",
apiKey: process.env.GEMINI_API_KEY,
});
const { text } = await generateText({
model: provider("gemini-2.5-flash"),
prompt: "Hello",
maxRetries: 0,
});
console.log(text);curl https://generativelanguage.googleapis.com/v1beta/openai/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $GEMINI_API_KEY" \
-d '{"model":"gemini-2.5-flash","messages":[{"role":"user","content":"Hello"}]}'import os
from openai import OpenAI
client = OpenAI(
base_url="https://generativelanguage.googleapis.com/v1beta/openai",
api_key=os.environ["GEMINI_API_KEY"],
)
stream = client.chat.completions.create(
model="gemini-2.5-flash",
messages=[{"role": "user", "content": "Hello"}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)Google AI Studio Questions
Is the Google AI Studio API Key Really Free?
Yes. In supported regions you can generate a Gemini API key in Google AI Studio with a regular Google account and no credit card, subject to per-model RPM, TPM and RPD limits.
When Do Gemini Free Tier Limits Reset?
Per-minute limits (RPM and TPM) roll over every 60 seconds, while daily requests-per-day (RPD) quotas reset at midnight Pacific Time (00:00 PT).
Does Google Train on Gemini Free Tier API Prompts?
Google states that unpaid free-tier prompts and outputs may be used to improve Google products and reviewed by human reviewers. Do not send private customer records or proprietary code on the unpaid tier.
Can I Use Gemini With the OpenAI Python or Node SDK?
Yes. Set base_url to https://generativelanguage.googleapis.com/v1beta/openai and pass your GEMINI_API_KEY as api_key.