Gemma vs Gemini: Open Weights vs Google's API
They sound like the same thing, but they are opposites. Gemma is Google DeepMind's family of open-weight models — you download the weights and run them on your own hardware, and the current flagship (Gemma 4, released April 2, 2026) ships under the permissive Apache 2.0 license. Gemini is Google's closed, proprietary flagship family — there are no downloadable weights; you reach it only through a paid, per-token API. So the choice is not "which is better" but "do I need weights I can host, or a managed frontier API I can call?" This guide draws the line cleanly — sizes, license, cost model — and gives you a one-question decision.
The one-line difference
Gemma is Google's open-weight family you download and self-host; Gemini is Google's closed flagship you can only call through a paid API. The names rhyme and both come from Google, which is exactly why they get confused — but they sit on opposite sides of the open-vs-closed line:
- Gemma — built by Google DeepMind and released as open-weight models (pre-trained and instruction-tuned). You download the weights from Hugging Face, Kaggle, or Ollama and run them on your own hardware. The current flagship is Gemma 4 (April 2, 2026), under Apache 2.0.
- Gemini — Google's proprietary, frontier-class family. There are no downloadable weights; you access it only through the paid Gemini API, billed per token.
So this is not a "which model wins a benchmark" article. It is a "which delivery model fits your job" article — and the answer usually falls out of one question you already know the answer to.
What Gemma is
Gemma is Google DeepMind's open-weight model family — self-hostable, fine-tunable, and (for Gemma 4) licensed for commercial use. The defining property is that you get the weights. That unlocks the things a closed API cannot do:
- Run it anywhere — your own GPUs, a cloud VM, on-device, or fully offline. The weights are downloadable from Hugging Face, Kaggle, and Ollama.
- Fine-tune on private data without shipping that data to an external API.
- Commercial-friendly license — Gemma 4 ships under Apache 2.0, which permits commercial use, fine-tuning, and redistribution without a separate approval process.
Gemma is also a family, not one model. Beyond the core releases, Google publishes specialized open variants: MedGemma (medical), ShieldGemma 2 (safety classification), EmbeddingGemma (embeddings), T5Gemma, TranslateGemma (translation), and the tiny Gemma 3 270M. All open-weight, all self-hostable. If your workload maps to one of those, you can host a purpose-built small model instead of paying frontier prices for a general one. For where Gemma sits against the wider open field, see our best open-source LLM roundup.
What Gemini is
Gemini is Google's closed, proprietary flagship family — no weights, API only, paid per token. You do not host Gemini; you send authenticated requests to the Gemini API and pay for what you use. That is the trade: you give up control over hosting and fine-tuning in exchange for a managed, frontier-class model with zero infrastructure on your side.
The current lineup, per Google's model docs, spans two generations: the Gemini 3 series (for example Gemini 3.5 Flash and Gemini 3.1 Flash-Lite) and the Gemini 2.5 series (Gemini 2.5 Pro, Flash, and Flash-Lite). These are proprietary — there is no equivalent of "download the Gemini weights." If a workflow needs weights on your own machines, Gemini is structurally the wrong tool and Gemma is the right one.
Gemma vs Gemini: side-by-side
The two differ on almost every axis that matters for a build decision. This table is synthesized from Google's primary docs (sources noted below):
| Dimension | Gemma | Gemini |
|---|---|---|
| Type | Open-weight | Closed / proprietary |
| Weights downloadable? | Yes (HF, Kaggle, Ollama) | No |
| Self-host / offline? | Yes | No — API only |
| Fine-tune on your data? | Yes | Managed only |
| License | Apache 2.0 (Gemma 4) | Proprietary API terms |
| Current flagship | Gemma 4 (Apr 2, 2026) | Gemini 3.x / 2.5 series |
| Cost model | Your compute cost | Per-token API pricing |
| Best for | Privacy, on-device, no per-call bill | Max capability, zero infra |
Sources: Gemma type/weights/license from the Gemma 4 model card and the Gemma 4 announcement; Gemini type/lineup/pricing from Google's Gemini models and pricing docs. All vendor-reported.
Gemma 4 sizes and license
Gemma 4 ships in five variants, from a 2.3B-effective edge model up to a 30.7B dense model. The size range is the point: you pick the smallest model that clears your quality bar and host it cheaply. Per the Gemma 4 model card:
| Variant | Parameters | Notes |
|---|---|---|
| E2B | 2.3B effective (5.1B w/ embeddings) | Edge / on-device |
| E4B | 4.5B effective (8B w/ embeddings) | Efficient small |
| 12B Unified | 11.95B | Mid-size dense |
| 26B A4B MoE | 25.2B total, 3.8B active | Sparse mixture-of-experts |
| 31B Dense | 30.7B | Largest / most capable |
All five are open-weight under Apache 2.0 (for Gemma 4). The MoE variant is worth a note: at 25.2B total but only 3.8B active parameters, it aims for larger-model quality at a smaller inference cost — the same design idea behind other modern open models. If self-hosting a big open model is on your roadmap, the hardware math matters; our GPT-OSS 120B requirements guide walks through the VRAM realities for a much larger open model, and the smaller Gemma variants are far more forgiving.
The cost models are different in kind, not degree
Gemini has a per-token price; Gemma has no API price at all — you pay for compute. This is the practical fork. With Gemini you pay Google per token, so cost scales directly with volume:
| Gemini model | Input / 1M | Output / 1M |
|---|---|---|
| Gemini 3.5 Flash | $1.50 | $9.00 |
| Gemini 2.5 Flash | $0.30 | $2.50 |
Vendor-reported, from Google's Gemini API pricing docs.
Gemma has no such line item — Google does not sell Gemma per token, because you run it. Your cost is the GPU or CPU time on whatever you host it on. That flips the economics: Gemini is cheaper to start (no infra, pay only for calls) and Gemma is cheaper at scale (fixed compute, no marginal per-token bill) once volume is high enough to amortize the hardware. Where exactly the lines cross depends on your traffic; our cheapest-LLM cost guide lays out the per-token side, and the best-LLM roundup weighs capability against price across providers.
Which do you need?
Answer one question — do you need the weights, or a managed API — and the choice is made.
Choose Gemma if any of these is true: you must keep data on your own infrastructure (privacy, compliance, air-gapped), you want to fine-tune on private data, you need to run offline or on-device, you want no per-token bill at high volume, or you want to build on a permissively licensed open model. Start with an E2B or E4B variant on modest hardware and size up only if quality demands it.
Choose Gemini if you want maximum frontier capability with zero infrastructure to manage, your volume is low-to-moderate enough that per-token pricing is fine, and you are comfortable sending requests to a managed API. It is the fastest path from idea to working call.
And it is not always one or the other. A common pattern is to route cheap, high-volume, or privacy-sensitive traffic to a self-hosted Gemma and reserve Gemini for the hardest requests — the sort of tiered routing covered in our LLMs for AI agents guide.
Reaching open and closed models from one place
You do not have to pick one integration and live with it. Whether you settle on a self-hosted open model like Gemma, a paid frontier API, or a mix, the wiring is smoother when everything speaks one interface. DataLLM Lab exposes 300+ models — open-weight and closed — behind a single OpenAI-compatible API, so switching between an open model and a managed one is a string change, not a rewrite. That also means you can prototype against a hosted model today and swap in your own self-hosted Gemma later without touching the rest of your code. For the architecture, see what an LLM gateway is.
Call open and closed models on one key
DataLLM Lab routes across 300+ models — open-weight and proprietary — behind one OpenAI-compatible endpoint at https://www.datallmlab.com/v1. Prototype fast, then swap in a self-hosted model without a rewrite.
FAQ
What is the difference between Gemma and Gemini?
Gemma is Google DeepMind's open-weight, self-hostable family — download the weights (Hugging Face, Kaggle, Ollama) and run them yourself; Gemma 4 is Apache 2.0. Gemini is Google's closed, proprietary flagship, available only via a paid per-token API with no downloadable weights.
Is Gemma open source?
Gemma is open-weight — the weights are downloadable and self-hostable. Gemma 4 is under Apache 2.0, permitting commercial use, fine-tuning, and distribution. Versions predating Gemma 4 use Google's Gemma Terms of Use instead, so check the license of the version you download.
Can you self-host Gemini?
No. Gemini is proprietary and API-only — there are no downloadable weights. You reach it through Google's Gemini API via authenticated, per-token requests. If you need weights on your own infrastructure, that is Gemma.
How much does Gemini cost?
Per token. Per Google's pricing docs, Gemini 3.5 Flash is $1.50 / 1M input and $9.00 / 1M output; Gemini 2.5 Flash is $0.30 / 1M input and $2.50 / 1M output. Gemma has no per-token price — you pay for the compute you run it on.
What sizes does Gemma 4 come in?
Five variants per the model card: E2B (2.3B effective), E4B (4.5B effective), 12B Unified (11.95B), 26B A4B MoE (25.2B total / 3.8B active), and 31B Dense (30.7B). The E-variants target smaller and on-device hardware.
Which should I use, Gemma or Gemini?
One question: do you need the weights or a managed API? Gemma for self-hosting, fine-tuning, offline/on-device, or no per-token bill (Apache 2.0 on Gemma 4). Gemini for maximum frontier capability with zero infrastructure via a paid API.
Are there specialized Gemma models?
Yes — MedGemma (medical), ShieldGemma 2 (safety), EmbeddingGemma (embeddings), T5Gemma, TranslateGemma (translation), and Gemma 3 270M. All are open-weight, so you can download and host them like the core models.
DataLLM Lab