Llama Guard 4 12B

Meta
meta/llama-guard-4-12bOpen Weights

Multimodal Llama 4-based safety classifier for moderating prompts and responses

Benchmark Pricing$0.18 / 1M in$0.18 / 1M out
Context: 163,840 tokens•Max Output: 163,840 tokens•Released: 2025-04-29

TECHNICAL SPECIFICATIONS

Context Window163,840163.8K tokens
Max Output163,840163.8K tokens
LicenseLlama 4 Community LicenseSelf-hostable
Input Modalities
TextVision
Function / Tool CallingNot Supported
Structured OutputsPrompt Based

MODEL CONTEXT PROTOCOL (MCP) READINESS

⚠ Llama Guard 4 12B does not natively advertise tool-calling capabilities. When connecting to MCP servers, function calling must be handled via structured prompt injection.

MCP Context Window Recommendations

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

API CALL INVOCATION EXAMPLE

// Example: Calling Llama Guard 4 12B via OpenAI SDK
import OpenAI from "openai";

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

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

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

PRICING BY PROVIDER

5 providers
Hugging Facemeta-llama/Llama-Guard-4-12B
$0.18 / $0.18
Nvidiameta/llama-guard-4-12b
$0.00 / $0.00
Kilo Gatewaymeta-llama/llama-guard-4-12b
$0.14 / $0.14
Deep Inframeta-llama/Llama-Guard-4-12B
$0.18 / $0.18
OpenRoutermeta-llama/llama-guard-4-12b
$0.18 / $0.18

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