Gemma 4 12B IT

GoogleMCP Tool CallReasoning
google/gemma-4-12b-itOpen Weights

Compact Gemma 4 instruction model for open, self-hosted chat and reasoning

Benchmark Pricing$0.05 / 1M in$0.25 / 1M out$0.03 cache read
Context: 262,144 tokens•Max Output: 32,768 tokens•Released: 2026-06-09

TECHNICAL SPECIFICATIONS

Context Window262,144262.1K tokens
Max Output32,76832.8K tokens
LicenseOpen SourceSelf-hostable
Input Modalities
TextVision
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema

MODEL CONTEXT PROTOCOL (MCP) READINESS

✓ Gemma 4 12B 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 262,144 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.

API CALL INVOCATION EXAMPLE

// Example: Calling Gemma 4 12B 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-4-12b-it",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

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

PRICING BY PROVIDER

3 providers
NanoGPTgemma-4-12b-it-semancer
$0.05 / $0.25$0.03 cache
Pioneergoogle/gemma-4-12B-it
$0.25 / $0.25$0.25 cache
SiliconFlowgoogle/gemma-4-12B-it
$0.10 / $0.30

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

Prompt Caching Active

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