# Gemma 4 API: free and cheap ways to call it

Gemma 4 API options: free OpenRouter variants, paid prices per million tokens, Google's free Gemini API tier and the Apache 2.0 open weights.

## Summary

You can call the Gemma 4 API for free in two places: the `:free` variants of Gemma 4 31B and 26B A4B on OpenRouter, and Google's Gemini API free tier. Paid OpenRouter endpoints start at $0.0765 per million input tokens ([OpenRouter, Gemma 4 26B A4B](https://openrouter.ai/google/gemma-4-26b-a4b-it), read 2026-10-13). The weights are open.

Gemma 4 is Google's open model family, and it sits next to this week's big launches as the cheap option. A free model is only useful if you know where it stops: a cap on requests per day, a shorter answer, a size that is not served. This post lists the sizes and their release dates, the price of every Gemma 4 endpoint in the OpenRouter list, what 1,000 agent runs cost on each, a checklist for picking free or paid, and the new EmbeddingGemma 2.

## Gemma 4 sizes and release dates

Google released Gemma 4 in steps between March and June 2026, under the Apache 2.0 license, per [Google's launch post](https://blog.google/innovation-and-ai/technology/developers-tools/gemma-4/) and the [Hugging Face model card](https://huggingface.co/google/gemma-4-31b-it).

| Release | Date | Context window | Source |
|---|---|---|---|
| E2B and E4B, the edge sizes | 2026-03-31 | 128K tokens | Gemma releases page, Google's launch post |
| 26B A4B, mixture of experts | 2026-03-31 | 256K tokens | Gemma releases page, Google's launch post |
| 31B, dense | 2026-03-31 | 256K tokens | Gemma releases page, Google's launch post |
| MTP versions of E2B, E4B, 31B and 26B A4B | 2026-04-16 | same as the base size | Gemma releases page |
| 12B Unified | 2026-06-03 | not on the releases page | Gemma releases page |

The releases page dates the first four sizes 2026-03-31, and Google's launch post is dated 2026-04-02. Google says the weights download from Hugging Face, Kaggle and Ollama.

## Gemma 4 API prices, free and paid

Gemma 4 had four listings in the OpenRouter list on 2026-10-13: two paid and two free. The E2B, E4B and 12B Unified sizes were not in it.

| OpenRouter id | Input per million | Output per million | Context | Longest answer, tokens | Source |
|---|---|---|---|---|---|
| google/gemma-4-31b-it:free | $0 | $0 | 262,144 | 32,768 | OpenRouter, Gemma 4 31B free, read 2026-10-13 |
| google/gemma-4-26b-a4b-it:free | $0 | $0 | 262,144 | 32,768 | OpenRouter, Gemma 4 26B A4B free, read 2026-10-13 |
| google/gemma-4-31b-it | $0.09 | $0.34 | 262,144 | 16,384 | OpenRouter, Gemma 4 31B, read 2026-10-13 |
| google/gemma-4-26b-a4b-it | $0.0765 | $0.255 | 262,144 | 235,929 | OpenRouter, Gemma 4 26B A4B, read 2026-10-13 |

Prices read from the OpenRouter model list through looot on 2026-10-13.

The longest answer is the maximum output the top provider serves, as the list states it. Note the odd one: the paid 31B endpoint caps an answer at 16,384 tokens, lower than its free variant.

Google's own route is free too. Google's Gemini API pricing page lists Gemma 4 as free of charge on the free tier and not available on the paid tier ([Google's pricing page](https://ai.google.dev/gemini-api/docs/pricing), read 2026-10-14). Google's launch post says you can try the 31B and 26B models in Google AI Studio.

## Gemma 4 cost for 1,000 agent runs

Take one agent run as 20,000 input tokens and 2,000 output tokens, an example size and not a measured average. Here is the arithmetic for 1,000 runs, from the table above.

The same 1,000 runs cost about 60 USD on Gemini 4 Argon at its introductory price, per [Muse Wonder vs Claude Opus 5.5 vs Gemini 4 Argon](https://looot.ai/blog/muse-wonder-vs-claude-opus-5-5-vs-gemini-4-argon). For jobs a small open model handles well, the paid 31B is about 24 times cheaper. Whether it handles your job well is something to test on 20 of your own inputs, not something a price table tells you.

## Gemma 4 free or paid: a checklist

Pick the row that matches your job.

- **Trying the model, a few dozen calls a day.** Use a `:free` variant. OpenRouter caps free models at 50 requests a day until you have bought 10 credits, then 1,000 a day, per its [limits page](https://openrouter.ai/docs/api-reference/limits) and FAQ.
- **An agent that runs a batch of hundreds.** Use a paid endpoint. A cap per day stops a batch halfway, and the paid 26B A4B costs about two dollars per 1,000 runs of the size above.
- **Long answers.** Use the paid 26B A4B, which the list shows with the longest output.
- **Image or video input.** The OpenRouter list shows text, image and video input for both the 31B and 26B A4B endpoints.
- **Data that must stay on your machine.** Download the weights and run them yourself. Nothing in this post applies then except the license.
- **Google as the only vendor.** Use the Gemini API free tier, which lists Gemma 4 as free of charge.

OpenRouter's FAQ also says free models are usually not suitable for production use. Treat the free variants as a way to test, not as the plan for a product.

## EmbeddingGemma 2, released 2026-10-06

Google released EmbeddingGemma 2 on 2026-10-06, a 740M parameter embedding model, per the [Gemma releases page](https://ai.google.dev/gemma/docs/releases). Google's developers blog describes it as a multimodal embedding model for semantic search on device ([Google Developers Blog](https://developers.googleblog.com/google-ai-edge-with-embeddinggemma-2/)). It turns text and other inputs into vectors for search, it does not chat. It was not in the OpenRouter model list on 2026-10-13.

## Where looot fits with Gemma 4

looot reads the OpenRouter model list for free, so an agent can check the current Gemma 4 prices before it plans a job, through the `openrouter-models` endpoint. looot also gives that agent one key for the data tools a small model needs around it: web search with `brave-search-res-web-search` or `exa-search`, and page reading with `jina-reader`. The price of each call shows before it runs. The [web search API page](https://looot.ai/use-cases/web-search-api) compares the search options, and [the free AI API post](https://looot.ai/blog/free-ai-api-for-agents) covers what free means once an agent makes the calls.

Other launches this week, priced side by side, are on [the model price page](https://looot.ai/models), and Meta's new model has its own [Muse Wonder page](https://looot.ai/resources/muse-wonder). Every free model in the list, not only Gemma, is in [free AI models you can call by API](https://looot.ai/blog/free-ai-models-you-can-call-by-api).

To try it from a terminal first:

## What this post does not cover

- Quality. We ran no benchmark. Google's launch post cites an Arena leaderboard rank, which is Google's reading of a third-party board, and we did not confirm it twice.
- Self-hosting cost. Running the weights yourself costs whatever your hardware costs, which no price list shows.
- Every host. Other providers serve Gemma 4 too. This post covers the OpenRouter list and Google's own API.

Last checked 2026-10-14. The OpenRouter list was read on 2026-10-13 and Google's pages on 2026-10-14.

## Questions

### Is the Gemma 4 API free?

Yes, in two places. OpenRouter lists free variants of Gemma 4 31B and 26B A4B with caps on requests per day, and Google's Gemini API free tier lists Gemma 4 as free of charge. Paid endpoints cost cents per million tokens.

### How much does Gemma 4 cost per million tokens?

Gemma 4 31B costs $0.09 input and $0.34 output per million tokens, and 26B A4B costs $0.0765 and $0.255 ([OpenRouter, Gemma 4 31B](https://openrouter.ai/google/gemma-4-31b-it), read 2026-10-13). The `:free` variants cost nothing per token.

### What is Gemma 4?

Gemma 4 is Google's open model family, released from 2026-03-31 in E2B, E4B, 26B A4B and 31B sizes, with a 12B Unified size on 2026-06-03. The weights are under Apache 2.0.

### Gemma 4 sizes: which ones can I call by API?

On OpenRouter, the 31B and 26B A4B, each in a paid and a free variant. The E2B, E4B and 12B Unified sizes were not in the OpenRouter list on 2026-10-13.

### How many free Gemma 4 requests do I get a day?

On OpenRouter, 50 requests a day across free models until you have bought 10 credits, then 1,000 a day.

### Can I use Gemma 4 commercially?

Google releases Gemma 4 under the Apache 2.0 license, per its launch post and the Hugging Face model card, which allows commercial use. Read the license text itself before you ship, this is not legal advice.

### What is EmbeddingGemma 2?

It is a 740M parameter embedding model Google released on 2026-10-06. It turns inputs into vectors for search and does not generate text.

### Gemma 4 vs Gemini 4 Argon: which should an agent use?

Use the one your task needs at the lowest price. For the example run in this post, 1,000 runs cost about 2 USD on paid Gemma 4 and about 60 USD on Gemini 4 Argon at its introductory price. Test both on your own inputs before you decide.

## For agents

### Code (text)

```text
1,000 runs = 20 million input tokens + 2 million output tokens

Gemma 4 31B, paid:      20 x 0.09   + 2 x 0.34  = 1.80 + 0.68 = 2.48 USD
Gemma 4 26B A4B, paid:  20 x 0.0765 + 2 x 0.255 = 1.53 + 0.51 = 2.04 USD
Gemma 4 31B, :free:     0 USD, but 1,000 requests

Free variant, 1,000 requests at OpenRouter's cap per day:
  under 10 credits ever purchased:  50 a day    -> 20 days
  10 credits or more purchased:     1,000 a day -> 1 day
```

### Price Gemma 4 and fetch sources for it

```text
Use looot to prepare a Gemma 4 job. First set up https://looot.ai/skill.md. Run the free endpoint openrouter-models and list every model id that starts with google/gemma-4, with its input and output price per million tokens and its context length. Then show me the price per call of brave-search-res-web-search and jina-reader, search the web for "Gemma 4 model card" with the cheaper of the two search options, and read the top result with jina-reader. Report what each call cost. Do not run more than 2 paid calls.
```

### Code (bash)

```bash
npx looot init
```
