How do I get a free Gemini API key, and how much does the Gemini API cost?
You create a Gemini API key for free in Google AI Studio. What the free tier includes, prices per million tokens, and when to use Dongee AI Router.

Go to Google AI Studio, accept the terms and click “Create API key”: the key is free, and the free tier gives you tokens at no cost, with limits and only for some models. If you plan to use several models from different providers with a single prepaid key, Dongee offers Dongee AI Router.
Updated December 4, 2026 · Dongee Team
Free tier vs paid tier
| Free tier | Paid tier | |
|---|---|---|
| Cost | 0 | Per million tokens, depending on the model |
| Models | Limited access to certain models | Includes models without a free tier, such as Gemini 3.1 Pro Preview |
| Use of your data | Google uses it to improve its products | Not used to improve its products |
| Limits | Per minute and per day, per project | Based on your tier; you can see them in AI Studio |
| Best if… | You are testing or learning | Your app serves customers or handles sensitive data |
Pricing for some models (USD per million tokens)
Source: official Gemini pricing page, checked on December 4, 2026. Prices change; check the page before you estimate costs.
| Model | Input (text) | Output | Free tier |
|---|---|---|---|
| Gemini 3.1 Flash-Lite | 0.25 | 1.50 | Yes |
| Gemini 3 Flash Preview | 0.50 | 3.00 | Yes |
| Gemini 3.8 Flash | 0.75 until Dec 31, 2026; 1.50 from Jan 1, 2027 | 3.75 until Dec 31, 2026; 7.50 from Jan 1, 2027 | Yes |
| Gemini 3.1 Pro Preview (up to 200,000 tokens) | 2.00 | 12.00 | No |
Steps to create and protect your key
- Open Google AI Studio with your Google account and accept the terms.
- Click “Create API key”. If you are a new user, a default Google Cloud project is created.
- Restrict the key to the Gemini API from the keys page.
- Store it in an environment variable (
GEMINI_API_KEY), never in your code or in Git. - Turn on billing and spending alerts only when you move to production.
If you already use other models, compare with how to get an OpenAI API key and the DeepSeek API key and its pricing. Questions about the Router? Write to Dongee sales chat.
Frequently asked questions
Is the Gemini API key free?
Yes. Creating the key in Google AI Studio costs nothing. The free tier gives you tokens at no cost, with usage limits and limited access to certain models; Google uses that content to improve its products.
How much does the Gemini API cost?
It depends on the model. According to Google’s official page, checked on December 4, 2026, Gemini 3.1 Flash-Lite costs 0.25 USD per million text input tokens and 1.50 USD per million output tokens; Gemini 3.1 Pro Preview costs 2 USD and 12 USD (prompts up to 200,000 tokens).
What limits does the Gemini free tier have?
Requests per minute, tokens per minute and requests per day, which differ for each model. You can see them in Google AI Studio; they apply per project, not per key.
Can I put the Gemini API key in my website?
No. Google recommends treating it like a password: don’t commit it to Git or expose it in the browser. Call the API from your server.
Does Dongee AI Router give access to Gemini?
The Router connects you to dozens of models with a single OpenAI-compatible key. Check its page to see which models are available today before you count on a specific one.
Comenta lo que quieras
Unete a la charla
Solo ingresa tu email