Skip to main content
Meta

Llama Guard 3

Llama Guard 3 is Meta's open-weight content moderation model, a safety classifier that labels prompts and model responses as safe or unsafe across hazard categories.

Input from
$0.055 / 1M tokens
on Liquid Inference · 1 provider
Output from
$0.055 / 1M tokens
on Liquid Inference

API Pricing

ProviderInput / 1MOutput / 1M
$0.055$0.055

Prices updated daily. Last check: Nov 23, 2026

Compare API pricing for every Llama model →

Llama Guard 3 pricing by provider

Input, output, and batch rates, plus alternatives, for one provider at a time.

Model Details

General

Creator
Meta
Modalities
Text

Capabilities

Open Source
No
Aliases
meta-llama/Llama-Guard-3-8B

Strengths & Limitations

Strengths

  • Purpose-built for safety classification rather than repurposed from a general chat model, so outputs are short and structured
  • Open weights under the Llama community license, allowing on-premise or private-cloud deployment where moderation data cannot leave your infrastructure
  • Classifies both user prompts and model responses, covering input filtering and output filtering with a single component
  • Hazard taxonomy is supplied in the prompt template, so categories can be narrowed or redefined per application without fine-tuning
  • Returns violated category codes alongside the safe/unsafe verdict, which supports category-level routing, logging, and analytics
  • The 8B size keeps guardrail latency and compute overhead small relative to the generation model it protects
  • Available both from hosted inference providers and as a self-hosted checkpoint, so deployment can change without changing the integration

Limitations

  • Not a general-purpose chat or reasoning model — it only emits classification verdicts and should not be used for generation
  • Binary safe/unsafe output with category codes provides no severity score or calibrated confidence value by default
  • Adds an extra inference call per turn, increasing end-to-end latency and total token spend in a guarded pipeline
  • Classification quality varies by language and by hazard category, and non-English coverage is weaker than English
  • Taxonomy and training reflect Meta's safety policy choices, which may not match a given platform's moderation policy without adjustment
  • As a Llama-derived model it is bound by the Llama community license rather than a fully permissive open-source license

Key Features

•Safe/unsafe classification of conversational content
•Hazard category codes returned with each unsafe verdict
•Prompt classification and response classification in one model
•Configurable category list passed via the prompt template
•Open weights for self-hosting on your own GPUs
•8B parameter checkpoint (meta-llama/Llama-Guard-3-8B)
•Structured, easily parsed short-form output
•Available through multiple hosted inference providers

About Llama Guard 3

Llama Guard 3 is a content moderation model released by Meta as part of the Llama Guard line of safeguard models that accompany the Llama family. Rather than being a general-purpose chat assistant, it is a classifier: it takes a conversation — a user prompt, a model response, or both — and returns a judgment of whether the content is safe or unsafe, along with the hazard category or categories that were violated. The variant most commonly served through inference APIs is the 8B checkpoint, listed in our catalog under the alias meta-llama/Llama-Guard-3-8B. Because it is a Llama derivative, Llama Guard 3 is distributed under Meta's Llama community license with open weights, which means it can be self-hosted on your own GPUs as well as called through hosted inference providers. Its output format is terse and structured — a safe/unsafe verdict followed by violated category codes — which makes it straightforward to parse programmatically and to wire into a request pipeline without additional prompt engineering. The taxonomy it classifies against is configurable at inference time: you can pass the category definitions in the prompt template and omit categories that are not relevant to your application. In practice, Llama Guard 3 is deployed as a guardrail around another model. A typical setup runs the user's input through Llama Guard 3 before it reaches the generation model, and optionally runs the generated response through it again before returning anything to the user. It competes with hosted moderation endpoints from other labs and with general-purpose chat models prompted to act as judges; its differentiators are open weights, self-hosting, and the fact that it is a small model whose cost and latency are low relative to the generation model it is guarding. We do not track a published context window figure for this entry — check the provider's documentation for the serving configuration you intend to use.

Common Use Cases

Llama Guard 3 fits anywhere a generative application needs a programmable safety layer: screening user prompts before they reach an assistant, screening assistant output before it is displayed, moderating user-generated content in forums and chat products, and filtering training or evaluation datasets in bulk. Because it is small and open-weight, it is well suited to high-volume pipelines where per-request moderation cost matters, and to regulated or privacy-sensitive deployments where content cannot be sent to a third-party moderation API. Teams building agentic systems often place it at the tool-input and tool-output boundaries as well. It is a poor fit for tasks requiring explanation, nuanced policy adjudication, or human-readable rationales — for those, a general-purpose reasoning model prompted as a judge, or human review, is the better choice, with Llama Guard 3 handling the cheap first pass.

Frequently Asked Questions

What does Llama Guard 3 cost to run?

Pricing depends on which provider serves it and on the pricing model — hosted inference is typically billed per input and output token, while self-hosting is billed as GPU time. Because it is an open-weight model, several providers host it and rates differ between them. See the pricing table on this page for current per-provider figures, and remember that in a guarded pipeline you pay for both the moderation call and the generation call.

What is Llama Guard 3 best used for?

It is best used as a guardrail around another model: classifying user prompts before generation and model responses before they are returned, flagging content against a hazard taxonomy. It is also used for bulk moderation of user-generated content and for filtering datasets. It is not intended for chat, summarization, coding, or any generative task.

Can I change which categories it checks for?

Yes. The hazard categories are supplied as part of the prompt template at inference time, so you can omit categories that do not apply to your product or restate them in your own wording. Substantially changing the policy definitions can shift classification behavior, so re-evaluate on your own labeled data after any edit.

How does it differ from a hosted moderation API?

The main practical differences are deployment and control. Llama Guard 3 ships with open weights under the Llama community license, so it can run inside your own infrastructure and its taxonomy can be adjusted in the prompt; hosted moderation endpoints from other vendors are typically fixed-taxonomy and run on the vendor's servers. The trade-off is that you are responsible for serving, scaling, and evaluating it.

Do I still need human review if I deploy Llama Guard 3?

Yes for most production systems. It is a classifier with measurable false positive and false negative rates that vary by category and language, so it is usually deployed as an automated first pass feeding an escalation queue rather than as the sole decision maker on enforcement actions.