Gemma 3 4B IT

GoogleMCP Tool Call
google/gemma-3-4b-itOpen Weights

Open multimodal Gemma instruction model for efficient text generation and image understanding

Benchmark Pricing$0.20 / 1M in$0.20 / 1M out$0.10 cache read
Context: 131,072 tokens•Max Output: 131,072 tokens•Knowledge: 2024-08•Released: 2025-03-12

TECHNICAL SPECIFICATIONS

Context Window131,072131.1K tokens
Max Output131,072131.1K tokens
LicenseOpen SourceSelf-hostable
Input Modalities
TextVision
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema

MODEL CONTEXT PROTOCOL (MCP) READINESS

✓ Gemma 3 4B IT natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.

MCP Context Window Recommendations

With a context capacity of 131,072 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.

API CALL INVOCATION EXAMPLE

// Example: Calling Gemma 3 4B IT via OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.GOOGLE_API_KEY,
});

const response = await client.chat.completions.create({
  model: "google/gemma-3-4b-it",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

console.log(response.choices[0].message.content);

PRICING BY PROVIDER

10 providers
NanoGPTunsloth/gemma-3-4b-it
$0.20 / $0.20$0.10 cache
AI/ML APIgoogle/gemma-3-4b-it
$0.07 / $0.14$0.06 cache
Eden AIamazon/google.gemma-3-4b-it@us
$0.04 / $0.08
Merge Gatewaygoogle/gemma-3-4b-it
$0.04 / $0.08
Hugging Facegoogle/gemma-3-4b-it
$0.05 / $0.10
Nvidiagoogle/gemma-3-4b-it
$0.00 / $0.00
Amazon Bedrockgoogle.gemma-3-4b-it
$0.04 / $0.08
Kilo Gatewaygoogle/gemma-3-4b-it
$0.04 / $0.05$0.02 cache
Deep Infragoogle/gemma-3-4b-it
$0.05 / $0.10
OpenRoutergoogle/gemma-3-4b-it
$0.04 / $0.05$0.02 cache

Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.

Prompt Caching Active

This model supports prompt caching at $0.10 / 1M tokens, saving up to 50% on repetitive MCP tool definitions and system instructions.