Gemma 4 E2B

GEMMA

Small multimodal LLM supporting text, image, audio and video inputs.

Text GenerationllmmultimodalgemmareasoningFine-tunableRAG
Gemma 4 E2B: Text Generation model on Kainguru

About Gemma 4 E2B

Gemma 4 E2B — a small, efficient multimodal LLM that accepts text, image, audio, and video inputs and returns a generated text response. Suited to chat and instruction-following, visual question answering, audio transcription/translation, video understanding, and lightweight reasoning.

Capabilities

  • Text chat / instruction following — prompt (optionally with system_prompt)
  • Vision (VQA) — attach images via image_input
  • Audio understanding — transcribe (asr) or translate (ast) via the audio-task inputs
  • Video understanding — attach video_input
  • Optional reasoning — enable_thinking adds an extended chain-of-thought step

You must provide either a prompt or an audio_task (they form a one-of group). See the API tab for ready-to-run request snippets.

Gemma 4 E2B inputs and output

NameTypeRequiredDefaultDetails
prompttextOne of: prompt, audio_task—User prompt. Required if audio_task is not set.
Min 1 characters
system_prompttextNo—System-level instruction prepended before the user prompt.
max_new_tokensintegerNo200Maximum number of tokens to generate.
1–8192
temperaturenumberNo0.7Sampling temperature. Higher values increase randomness.
0–2
top_pnumberNo—Cumulative probability threshold for nucleus sampling.
0–1
top_kintegerNo—Number of highest-probability tokens to keep for sampling.
1–200
do_samplebooleanNotrueWhether to use sampling; if false, greedy decoding is used.
enable_thinkingbooleanNofalseEnables extended chain-of-thought reasoning before the final answer.
image_inputfile listNo—One or more image URLs for visual question answering.
image/png, jpeg, webp
audio_inputfile listWhen audio_task in asr, ast—Audio file URL(s). Required when audio_task is asr or ast.
audio/wav, mp3
video_inputfile listNo—Video file URL(s) for video understanding tasks.
video/mp4, webm
vision_token_budgetintegerNo280Maximum image tokens consumed per image input.
Allowed: 70, 140, 280, 560, 1120
audio_tasktextOne of: prompt, audio_task—Audio processing task: asr (transcription) or ast (translation). Required if prompt is not set.
Allowed: asr, ast
audio_languagetextWhen audio_task in asr, ast—Source language code for ASR or AST tasks.
audio_target_languagetextWhen audio_task = ast—Target language code for AST (translation) tasks.

Output. Returns plain text: Generated text response.

Run Gemma 4 E2B with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=GEMMA" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "do_sample": true,
    "enable_thinking": false,
    "max_new_tokens": 200,
    "temperature": 0.7,
    "vision_token_budget": 280
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "GEMMA",
        {
          "do_sample": True,
          "enable_thinking": False,
          "max_new_tokens": 200,
          "temperature": 0.7,
          "vision_token_budget": 280
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune Gemma 4 E2B

You can fine-tune Gemma 4 E2B on your own data and run the tuned model through the same API. Dataset: JSONL file(s): one JSON object per line, either {"text": "..."} or {"prompt": "...", "response": "..."}.

Gemma 4 E2B also supports retrieval-augmented generation.

The steps are in the docs.

Gemma 4 E2B pricing

Price per 1M tokens: 2038 credits ($20.38). The price is shown again before every run; all prices are on the pricing page.

Licence and source

Gemma 4 12B IT: Text Generation model on Kainguru
Text Generation

Gemma 4 12B IT

Google Gemma 4 12B, a multilingual assistant for chat, writing, code and maths in over 140 languages, that can reason…

Fine-tunable
Gemma 4 31B IT: Text Generation model on Kainguru
Text Generation

Gemma 4 31B IT

Gemma 4 31B, Google's open assistant for chat, reasoning, writing and code in over 35 languages, that thinks step by…

Fine-tunable
DeepSeek-R1 Distill Llama 8B: Text Generation model on Kainguru
Text Generation

DeepSeek-R1 Distill Llama 8B

Reasoning model that shows its chain of thought before answering, distilled into a Llama 8B base.

Fine-tunable
DeepSeek-R1-0528 Qwen3 8B: Text Generation model on Kainguru
Text Generation

DeepSeek-R1-0528 Qwen3 8B

DeepSeek-R1-0528 Qwen3 8B, a reasoning model for maths, code and science that works through a problem step by step…

Fine-tunable
MiniCPM5 2B: Text Generation model on Kainguru
Text Generation

MiniCPM5 2B

MiniCPM5 2B, a small English and Chinese assistant for chat, code, maths and long documents, that can reason step by…

Fine-tunable
Qwen3.5 2B: Text Generation model on Kainguru
Text Generation

Qwen3.5 2B

Qwen3.5 2B, a small assistant for chat, writing, summaries and code in about 200 languages, Azerbaijani included, that…

Fine-tunable