How to Get a Gemma 4 API Key for Free
Updated 27 October 2026.
In short: Google's Gemma 4 is free on its own Gemini API: 14,400 requests a day, with no credit card and no paid tier. Gemma 4 is also free on OpenRouter, Ollama Cloud, Cloudflare Workers AI and NVIDIA's API catalog.
Google's own API: free, with no paid tier
Google's Gemini API pricing page lists Gemma 4 31B and Gemma 4 26B A4B with input and output free of charge, and no paid tier. The free limits are 30 requests a minute, 16,000 tokens a minute and 14,400 requests a day per model. A key comes from Google AI Studio: how to get a Gemini API key for free shows each step.
Where Gemma models are free
| Where | Gemma model | Free allowance | What it needs |
|---|---|---|---|
| Google Gemini API | gemma-4-31b-it, gemma-4-26b-a4b-it | 14,400 requests a day, 30 a minute | A free Google account; no card |
| OpenRouter | google/gemma-4-31b-it:free, google/gemma-4-26b-a4b-it:free | 50 requests a day | A free account |
| Ollama Cloud | gemma4:31b | A starter amount each month, shared | A free account |
| Cloudflare Workers AI | @cf/google/gemma-4-26b-a4b-it | Inside the 10,000 free Neurons a day | A free Cloudflare account |
| NVIDIA (build.nvidia.com) | google/gemma-4-31b-it | Up to 40 requests a minute, no daily limit stated | Phone verification, not offered in every country |
Gemma 4 31B answered on a free Ollama key on 26 October 2026. The full list of free AI APIs, with each limit and source, is on how to get AI API keys for free.
Use a free Gemma model in an app made for OpenAI
In the app, enter the service's key, its base URL and its Gemma model name:
| Service | Base URL | Model name |
|---|---|---|
| Gemini API | https://generativelanguage.googleapis.com/v1beta/openai/ | gemma-4-31b-it |
| OpenRouter | https://openrouter.ai/api/v1 | google/gemma-4-31b-it:free |
| Ollama Cloud | https://ollama.com/v1 | gemma4:31b |
| Cloudflare Workers AI | https://api.cloudflare.com/client/v4/accounts/YOUR_ACCOUNT_ID/ai/v1 | @cf/google/gemma-4-26b-a4b-it |
| NVIDIA | https://integrate.api.nvidia.com/v1 | google/gemma-4-31b-it |
To put several free keys behind one address on your own computer, the open-source OmniRoute gateway switches to the next key when one runs out.
Words to know
- API key: the password an app uses to call a model. See what is an API key.
- Gemma 4: Google's open-weight model family; 31B is the larger model, 26B A4B a mixture-of-experts model with 4B active parameters.
- Base URL: the address an app sends its requests to.
- Token: a piece of a word; the unit models read and write. See tokens and context windows.
Frequently asked questions
Is the Gemma 4 API free?+
Yes. On Google's Gemini API, Gemma 4 31B and 26B A4B are free of charge with no paid tier: 14,400 requests a day and 30 a minute per model, with no credit card.
How do I get a Gemma 4 API key?+
Create a free key in Google AI Studio; the same key works for Gemini and Gemma models. Use the model name gemma-4-31b-it.
Where else is Gemma 4 free?+
On OpenRouter (google/gemma-4-31b-it:free, 50 requests a day), Ollama Cloud (gemma4:31b), Cloudflare Workers AI (@cf/google/gemma-4-26b-a4b-it) and NVIDIA build.nvidia.com (google/gemma-4-31b-it).
What is the Gemma 4 base URL?+
On the Gemini API, https://generativelanguage.googleapis.com/v1beta/openai/ with a Google AI Studio key and the model name gemma-4-31b-it.
More free API key tutorials
- How to get a Gemini API key for free
- How to get a Groq API key for free
- How to get a Cloudflare Workers AI API key for free
- How to get a Cohere API key for free
- How to get an OpenRouter API key for free
- How to get an Experimental Labs API key for free (with the $1 verification)
- How to get a Requesty API key for free
- How to use Kilo Code free models (no API key)
- How to get an LLM7 API key for free
- How to use a free AI API without an API key
- How to get an Ollama API key for free
- How to get a Gonka AI API key for free
- How to get a Perplexity API key for free
- Where Qwen is free
- Where Mistral models are free
- The Grok API, checked on a new account
- Where DeepSeek models are free
- Where GLM models are free
- Where OpenAI models are free
- Every free AI API and its daily limit
By model: DeepSeek · OpenAI (GPT) · Claude · Grok · Perplexity · Mistral · Kimi · Qwen · GLM · MiniMax · Llama · Nemotron · gpt-oss
Want to use these APIs in a desktop app? OpenCode is a free, open-source AI coding app for Windows, Mac and Linux. How to add free API keys to OpenCode and pick a model.