Llama Guard 4 12B

by Meta

Llama Guard 4 is a 12-billion-parameter safety classification model that detects harmful content in both model inputs and outputs. It is built by pruning the Llama 4 Scout foundation, keeping only the shared expert to give it a dense feedforward early-fusion architecture rather than a mixture-of-experts design, which lets it run on a single GPU with 24GB of VRAM. The model classifies content against the hazard categories defined in the MLCommons taxonomy along with code interpreter abuse, covering areas such as violent crimes, sexual content, hate speech, self-harm, and intellectual property. It evaluates multilingual text and can process mixed text-and-image prompts, combining the capabilities of the earlier Llama Guard 3-8B and 3-11B-vision models into a single classifier with added multi-image support. Meta reports that, compared to Llama Guard 3, version 4 improves English recall by about 4% and F1 by about 8%, with roughly 17 to 20% gains on multi-image detection. It is designed to safeguard multimodal Llama 4 applications while staying light enough for real-time prompt and response filtering.

Key info

Input
Output
Features
Context window
164K
Max output
164K
Input price
$0.18 /1M
Output price
$0.18 /1M
  • US residency available
  • Zero data retention via Enterprise
  • No training by default

Available routes

Llama Guard 4 12B runs on 1 route through the Opper gateway. Compare residency, ZDR, and training posture at a glance β€” full data-handling detail per route below.

ProviderRegionZero data retentionTrainingInputOutput
USEnterpriseNo$0.18$0.18

Training posture across routes: No training on prompts by default.

Data handling per route

Each route hosting Llama Guard 4 12B has its own privacy posture, residency, and GDPR terms. Postures are maintained by Opper with a last-verification timestamp.

DeepInfra β€” United StatesπŸ‡ΊπŸ‡Έ

Zero data retention is available via Opper Enterprise contract. No training on customer data. US; unknown.

Zero data retention
Available via Opper Enterprise contract.
Training
No training on customer data.
Logging
Limited debug logs
Third-party access
None disclosed
GDPR DPA
No DPA
Transfer mechanism
unknown

Get started

Call Llama Guard 4 12B through the Opper gateway with one API key. Let your coding agent set it up, or call it directly β€” Opper is drop-in compatible with the OpenAI, Anthropic, and Google AI SDKs.

Set it up with your agent

Copy this and paste it into your coding agent β€” Claude Code, Cursor, Codex, and more β€” and it'll wire up Opper for you.

Or call it directly

import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.OPPER_API_KEY,
baseURL: "https://api.opper.click/v3/compat",
});
const completion = await client.chat.completions.create({
model: "deepinfra/meta-llama/Llama-Guard-4-12B",
messages: [{ role: "user", content: "Hello" }],
});
console.log(completion.choices[0].message.content);

Compare Llama Guard 4 12B with…

Side-by-side on privacy, EU hosting, pricing, and benchmarks.

Other models from Meta

Start building with 300+ models

One API key. Every major provider. Up and running in minutes.

Get startedView Documentation
Llama Guard 4 12B by Meta β€” pricing, benchmarks | Opper AI