Gemma 3n 4B

Google Generally Available

Gemma 3n E4B-it is optimized for efficient execution on mobile and low-resource devices, such as phones, laptops, and tablets. It supports multimodal inputs—including text, visual data, and audio—enabling diverse tasks...

Context
33K
tokens
Input
$0.060
per MTok
Output
$0.12
per MTok

About

Gemma 3n E4B-it is optimized for efficient execution on mobile and low-resource devices, such as phones, laptops, and tablets. It supports multimodal inputs—including text, visual data, and audio—enabling diverse tasks...

Modalities

Input
Text
Output
Text

Code Examples

curl https://openrouter.ai/api/v1/chat/completions \
  -H "Authorization: Bearer $OPENROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma-3n-e4b-it",
    "messages": [
      { "role": "user", "content": "Explain quantum entanglement in one sentence." }
    ]
  }'

API Parameters

Name Type Description
frequency_penalty number Penalize tokens by their frequency so far. Positive values reduce repetition.
logit_bias object Map of token-id to bias (-100…100) added to the logit before sampling.
max_tokens deprecated integer Deprecated. Use max_completion_tokens.
min_p unknown
presence_penalty number Penalize tokens that have appeared at all so far. Positive values encourage new topics.
repetition_penalty number Penalize repeated tokens (>1.0 reduces repetition, <1.0 encourages it).
stop array Up to 4 sequences where the API will stop generating tokens.
temperature number Sampling temperature; higher values produce more random output. 0 is deterministic.
top_k integer Limit sampling to the top-k most likely tokens at each step.
top_p number Nucleus sampling: consider only tokens whose cumulative probability ≥ top_p.

Standard OpenAI-compatible parameters. Consult the provider docs for model-specific behaviour.