Short answer
Gemma 4 is Google DeepMind’s family of open-weight generative models. Google lists five sizes: E2B, E4B, 12B, 26B A4B, and 31B. For an initial shortlist, consider E2B or E4B for edge use, or E2B, E4B, and 12B if you need native audio input. Google’s model documentation gives 128K context for the small models and up to 256K for the family; Google-published configurations list a 262,144-token position limit for 12B, 26B A4B, and 31B. The Gemini API guide lists hosted access to 26B A4B and 31B, but does not state a separate context limit for either API route. The public TokenForgeCloud information reviewed here does not confirm a Gemma 4 API. (Google Gemma 4 model card; Google model overview; Google model configurations: 12B, 26B A4B, 31B; Gemini API guide)
What is Gemma 4?
Gemma 4 is Google DeepMind’s open-weight generative model family for tasks such as text generation, coding, and reasoning. Google’s model card lists the license as Apache 2.0. It describes text and image input across the family, native audio support on E2B, E4B, and 12B, and text output. (Google Gemma 4 model card)
The five variants are E2B, E4B, 12B, 26B A4B, and 31B. Don’t confuse Gemma 4 with EmbeddingGemma: Google describes EmbeddingGemma 2 as an embedding model built on the Gemma 4 decoder architecture, not as the Gemma 4 generative-model family. (Google Gemma 4 model card; EmbeddingGemma documentation)
Which Gemma 4 model should you evaluate?
| Workload or constraint | Models to shortlist | What the documentation supports—and what remains uncertain |
|---|---|---|
| Edge or on-device deployment | E2B or E4B | Google positions these small models for mobile and edge use and states that small models have a 128K context window. Test fit on your actual device and runtime. |
| Native audio input | E2B, E4B, or 12B | Google identifies these three as supporting native audio. The model card also names video as a family capability, but the cited summary does not map video support to each variant; confirm the specific model and runtime before relying on video. |
| Native model context above 128K | 12B, 26B A4B, or 31B | Google’s overview states that small models have 128K context and medium models support 256K. Its Google-published configurations for each of these three named variants list max_position_embeddings: 262144 (256K). This is a native-model configuration limit, not a guarantee that a particular hosted API accepts the same length. |
| Hosted Gemini API | 26B A4B or 31B | Google lists gemma-4-26b-a4b-it and gemma-4-31b-it as supported Gemini API models. The guide does not specify a separate context limit for either API model ID, so confirm the applicable API limit before planning requests over 128K tokens. |
| Choosing between 26B A4B and 31B | Evaluate both against your task | Google describes 26B A4B as a Mixture-of-Experts model and 31B as dense. That is an architectural distinction, not evidence that either will be faster or more accurate for your workload. |
The model overview gives approximate model-weight memory estimates, but they are not complete runtime budgets: software overhead and KV-cache memory for the context window add to total use. (Google Gemma 4 model overview)
For a long-context or modality-sensitive application, verify the limit and supported inputs for the precise model and deployment route. Native model configuration does not, by itself, establish what a hosted API accepts. (Google Gemma 4 model card; Google 12B configuration; Google 26B A4B configuration; Google 31B configuration; Gemini API guide)
Can you use Gemma 4 through TokenForgeCloud?
The public TokenForgeCloud information reviewed here does not confirm a Gemma 4 production API. Its public homepage lists production APIs for Qwen, DeepSeek, GLM, and Seedance, but does not identify a Gemma 4 model ID or endpoint. That does not rule out a private or later offering; it means this guide cannot provide TokenForgeCloud integration instructions, limits, or pricing as established facts. (TokenForgeCloud)
Google’s Gemini API guide lists hosted access for gemma-4-26b-a4b-it and gemma-4-31b-it. Its Python example uses the google-genai client, generate_content, and response.text. The Gemini API client automatically detects the GEMINI_API_KEY or GOOGLE_API_KEY environment variable; if both are set, GOOGLE_API_KEY takes precedence. For example, set a key in your shell before running the documented call:
export GEMINI_API_KEY="YOUR_API_KEY"
from google import genai
client = genai.Client()
response = client.models.generate_content(
model="gemma-4-26b-a4b-it",
contents="Summarize this support ticket in one sentence.",
)
print(response.text)
The available sources here do not establish Gemma-specific production billing eligibility, paid-tier terms, or a per-token price. Check current model-specific availability, project limits, and billing terms before planning production use. (Run Gemma with the Gemini API; Gemini API key documentation)
A practical production-fit check
Before selecting a model or provider:
- Test representative inputs. Include routine requests, difficult cases, and each modality your application actually needs.
- Confirm exact API behavior. Check that the selected model and API accept your input format and support the context length and features you rely on.
- Evaluate quality on your task. Use task-specific acceptance criteria; don’t infer a winner from parameter count or an unrelated benchmark.
- Measure operational fit. Test latency and error handling under expected request patterns, and check provider limits and terms.
- Estimate cost from current provider terms and your usage. Don’t transfer another provider’s Gemma pricing to TokenForgeCloud.
Bottom line: E2B and E4B are Google’s documented edge-oriented candidates; E2B, E4B, and 12B are identified for native audio. Google-published native configurations list a 256K position limit for 12B, 26B A4B, and 31B. Google lists 26B A4B and 31B for hosted Gemini API access, but the cited API guide does not state a per-model context limit. TokenForgeCloud Gemma 4 availability remains unconfirmed by its public product information reviewed here.
Sources
Gemma 4 model card | Google AI for Developers
Gemma 4 model overview | Google AI for Developers
Gemma 4 12B configuration | Google on Hugging Face
Gemma 4 26B A4B configuration | Google on Hugging Face
Gemma 4 31B configuration | Google on Hugging Face
Run Gemma with the Gemini API | Google AI for Developers
Using Gemini API keys | Google AI for Developers
