Free Gemma API
Google's open Gemma models, free across Google AI Studio, Cloudflare, OpenRouter and Ollama.
FreeLLMAPI is a free, open-source LLM API that routes across every provider with a real free tier. The Gemma models below are served free by Cloudflare Workers AI, Google AI Studio, Ollama Cloud, OpenRouter — reachable through one OpenAI-compatible key, with automatic failover when a provider hits its rate limit.
Free Gemma models (6)
| Model | Provider | Context | Free limits | Capabilities |
|---|---|---|---|---|
| gemma-4-31b-it | Google AI Studio | 33K | 15 rpm, 1000 rpd | vision |
| google/gemma-4-31b-it:free | OpenRouter | 262K | 20 rpm, 200 rpd | — |
| gemma-4-26b-a4b-it | Google AI Studio | 33K | 15 rpm, 1000 rpd | vision |
| @cf/google/gemma-4-26b-a4b-it | Cloudflare Workers AI | 262K | ~10-20M | — |
| gemma4:31b | Ollama Cloud | 131K | ~20-30M | — |
| google/gemma-4-26b-a4b-it:free | OpenRouter | 262K | 20 rpm, 200 rpd | — |
How to use Gemma for free
- Install FreeLLMAPI — the open-source router (GitHub). It runs locally and keeps your keys on your machine.
- Add a free key for Cloudflare Workers AI (or any listed provider) on the Keys page — no credit card required.
- Point your OpenAI client at the local endpoint and pick a model:
from openai import OpenAI
# FreeLLMAPI runs locally; grab your unified key + endpoint on the Keys page.
client = OpenAI(base_url="http://localhost:3001/v1", api_key="freellmapi-...")
resp = client.chat.completions.create(
model="gemma-4-31b-it",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)
FAQ
Is the Gemma API really free?
Yes — these Gemma models run on genuine provider free tiers (served free by Cloudflare Workers AI, Google AI Studio, Ollama Cloud, OpenRouter). Inference costs nothing; you only add a free provider key.
Do I need a credit card?
No. The providers here offer free tiers that work without a card. You add the free key once and FreeLLMAPI routes to it.
How do I call Gemma through FreeLLMAPI?
Install the open-source router, add the provider's free key on the Keys page, then point any OpenAI SDK at your local endpoint — see the code sample above.