Meta
•
llama-guard-4-12b

Meta
llama-guard-4-12b

Meta's 12B multimodal safeguard classifier that moderates text and multi-image prompts and responses against the MLCommons hazard taxonomy.

Modality:
Text
Image
model ID
meta-llama/llama-guard-4-12b

Output Speed *

N/A
tok/s

Intelligence Index *

N/A
/ 100

Context Window *

163840
tokens

Input price

1.08
Anytoken

Output price

1.08
Anytoken
One Safety Classifier for Text and Multi-Image Moderation Llama Guard 4 12B is Meta's safeguard model. It classifies prompts and responses against the MLCommons hazard taxonomy and is meant to sit beside a generation model, not replace it. It merges Llama Guard 3 8B and Llama Guard 3 11B-vision into one 12B dense, natively multimodal model. It shares its tokenizer and vision encoder with Llama 4 Scout and Maverick. It suits teams that need input and output moderation for chat or vision apps. Access Llama Guard 4 12B via the AnyAPI.ai API

Performance

A Single Guard Model Replacing Separate Text and Vision Classifiers

Llama Guard 4 does the work of two earlier models. It covers the text-only Llama Guard 3 8B and the single-image Llama Guard 3 11B-vision. Meta's in-house evaluation says it roughly matches or exceeds both on English text, multilingual text and mixed text-and-image prompts, now with multiple images per prompt. This is Meta's own evidence, not independent testing. In production, you can run one moderation service for text and vision traffic instead of routing to separate guard models. Validate it on your own policy data first.

Technical Specifications

What the model supports

Llama Guard 4 12B is a 12-billion-parameter dense, early-fusion multimodal model. It accepts English and multilingual text plus mixed text-and-image prompts, including multiple images. Its output is a text classification verdict. The two specifications with the most production impact are the single-GPU footprint, which makes a self-hosted guard layer practical, and the shared Llama 4 tokenizer and vision encoder. Context window and maximum output limits are not confirmed here, so check them in your serving environment before sending long conversations.
Verified Specifications — 
llama-guard-4-12b
*
Input modalities
Text
Image
output modalities
Text
Context window
163840
 tokens
Maximum output tokens
16384
Reasoning
No
Pricing (standard)
1.08
 AnyTokens in
 / 
1.08
 AnyTokens out

Limitations & Trade-offs

Where llama-guard-4-12b falls short

1
Classifier, not a general model. Llama Guard 4 12B judges prompts and responses against a hazard taxonomy. It is not built for chat, coding, or reasoning. It adds a second model call to each moderated request, which adds latency and cost to the pipeline. If you need a model that both answers and refuses, rely on the main model's own alignment and use this model as an additional layer.
2
Evidence is mostly Meta's. The published comparisons against Llama Guard 3 come from Meta's in-house test set, and Meta notes your experience may vary. I found no independent benchmark of this model to cite. Your own policies, languages and image types may differ from Meta's test data. Run a labelled evaluation on real traffic before using it as a hard blocking gate.
3
Multilingual gains are limited. Meta describes multilingual performance as matching or exceeding Llama Guard 3, and its table shows multilingual results roughly level with the predecessor. Multilingual support covers the languages Llama Guard 3 supported, not an open-ended list. If you moderate many non-English markets, test each language separately and keep human review for borderline cases.
4
Input scope is text and images. Verified inputs are English and multilingual text and mixed text-and-image prompts. Audio, video and document-file moderation are not documented for this model, so those workloads need preprocessing, such as transcription, or a different safeguard approach. Meta also notes that input filtering and output filtering have different effects in its internal tests, so evaluate where in the flow to place the check.

Best-Fit Workloads

Where this model earns its place

01

Prompt and response guardrails


Llama Guard 4 12B is designed to detect problematic prompts and responses, which fits a pre-generation and post-generation moderation layer around any chat model. Meta designed it for Llama 4 Scout and Maverick and says it also works with the Llama 3 line. Chat products and copilots benefit most. Test input and output placement separately, since Meta reports they affect violation and refusal rates differently.

02

Image-and-text moderation


The model accepts mixed text-and-image prompts and, unlike Llama Guard 3-11B-vision, supports multiple images in one prompt. That makes it useful for vision assistants, multimodal chat and upload-based apps that need one classifier for text and images. It is a classification model, so it will not describe or caption images. Image-only moderation of video or audio is not documented.

03

Consolidating legacy guard models


Meta positions Llama Guard 4 as a drop-in replacement for Llama Guard 3 8B and 11B across text-only and multimodal use. Teams running separate text and vision guards can evaluate one model instead. Benefits are a simpler routing path and one policy surface to maintain. Verify parity on your own labelled data before retiring the older models.

04

Self-hosted safety layers


At 12B dense parameters and with Meta stating it can run on a single GPU, Llama Guard 4 is practical to host as a dedicated moderation service. Open weights are available on Hugging Face, which suits teams that want to benchmark and control the guard layer. If you do not want to operate GPUs, using it through an API is the alternative.

Pricing in anytokens via AnyAPI
Input
1.08
₳
Output
1.08
₳
Cache write
—
₳
Cache read
—
₳

Integration

Access llama-guard-4-12b via AnyAPI.ai

Access llama-guard-4-12b through AnyAPI.ai using a unified API built for multi-model AI applications. Integrate llama-guard-4-12b without maintaining a separate provider-specific connection, and keep the flexibility to test, switch, or combine models as your application requirements evolve.

01

One API integration

Access llama-guard-4-12b and other AI models through the same API workflow instead of maintaining separate integrations for every provider.

02

Easy model switching

Test llama-guard-4-12b against alternative models or switch models as your performance, capability, or cost requirements change without rebuilding your application around another provider API.

03

Flexible for production

Use llama-guard-4-12b from experimentation through production while keeping your AI stack flexible as workloads, traffic, and model requirements evolve.

04

Multi-model applications

Use llama-guard-4-12b for the workloads where it performs best and combine it with other models for tasks that require different capabilities, performance, or efficiency.

Frequently Asked Questions

Answers to common questions about integrating and using this AI model via AnyAPI.ai

Llama Guard 4 12B is Meta's safeguard model for classifying prompts and responses as safe or unsafe. It is aligned to the MLCommons hazard taxonomy and has 12 billion parameters. It is a natively multimodal dense model designed for the Llama 4 line, and it also works with Llama 3 models.

Yes, Llama Guard 4 12B accepts mixed text-and-image prompts. Unlike Llama Guard 3-11B-vision, it supports safety classification when multiple images are given in one prompt. Verified output is a text classification, not generated images. Audio and video moderation are not documented for this model.

Meta says Llama Guard 4 can be used as a drop-in replacement for Llama Guard 3 8B and 11B, for text-only and multimodal applications. Meta's in-house tests show it roughly matches or exceeds both. Run your own labelled test set before migrating production moderation.

Yes, Meta states Llama Guard 4 can be run on a single GPU. The model is 12 billion parameters and uses dense layers, which keeps its size small. The exact GPU memory you need depends on precision, serving stack and batch size, so benchmark your own setup.

The context window for Llama Guard 4 12B is not confirmed in the sources used for this page, so no figure is given. Do not assume it matches Llama Guard 3 8B. Check the AnyAPI.ai model page or Meta's documentation for your deployment, and test long conversations before relying on them.

* Benchmark data source: Artificial Analysis artificialanalysis.ai