Back to models
Gemma-4-E2B-it
Developed by Google DeepMind, Gemma-4-E2B-it is an edge-tier open-weight multimodal model with 2B effective parameters via Per-Layer Embeddings, natively accepting text, image, and audio inputs.
What you can do
- On-device image and voice Q&A
- Offline mobile document summarization
- Local edge function calling
Input & output
- Input
- Text prompts, variable-resolution images, and native audio clips (128K context window)
- Output
- Text responses, optional thinking traces, or structured function-call payloads
Try a prompt like this
Listen to this recorded customer voice note and inspect the attached router LED photo, then give concise troubleshooting steps.
Things to know
Apache 2.0 license; Per-Layer Embeddings yield ~5B total disk/memory footprint (~10GB BF16, ~4GB INT4/GGUF/LiteRT). Compact 2B effective capacity should be grounded with RAG for niche factual recall.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/chat/completions- Model repo ID
google/gemma-4-E2B-it
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
response = client.chat.completions.create(
model="google/gemma-4-E2B-it",
messages=[{"role": "user", "content": "Listen to this recorded customer voice note and inspect the attached router LED photo, then give concise troubleshooting steps."}],
)
print(response.choices[0].message.content)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide