Llama Guard 4 12B

Llama Guard 4 is a Llama 4 Scout-derived multimodal pretrained model, fine-tuned for content safety classification. Similar to previous versions, it can be used to classify content in both LLM inputs (prompt classification) and in LLM responses (response classification). It acts as an LLM—generating text in its output that indicates whether a given prompt or response is safe or unsafe, and if unsafe, it also lists the content categories violated. Llama Guard 4 was aligned to safeguard against the standardized MLCommons hazards taxonomy and designed to support multimodal Llama 4 capabilities. Specifically, it combines features from previous Llama Guard models, providing content moderation for English and multiple supported languages, along with enhanced capabilities to handle mixed text-and-image prompts, including multiple images. Additionally, Llama Guard 4 is integrated into the Llama Moderations API, extending robust safety classification to text and images.

ChatMeta1M tokens$0.1962 / $0.1962 · 1M

meta-llama/llama-guard-4-12b

Context
1M tokens
Completion cap
16,384
Tools
No
JSON
Yes
Released
2025-04-30

Call it from Geek Hub

Same OpenAI SDK. Change the base URL and the model id.

curl https://api.geekhub.mx/v1/chat/completions \
  -H "Authorization: Bearer $GEEKHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "meta-llama/llama-guard-4-12b",
    "messages": [{"role": "user", "content": "Hola"}]
  }'
Get an API key

Frequently asked questions

What is Llama Guard 4 12B?
Llama Guard 4 is a Llama 4 Scout-derived multimodal pretrained model, fine-tuned for content safety classification. Similar to previous versions, it can be used to classify content in both LLM inputs (prompt classification) and in LLM responses (response classification). It acts as an LLM—generating text in its output that indicates whether a given prompt or response is safe or unsafe, and if unsafe, it also lists the content categories violated. Llama Guard 4 was aligned to safeguard against the standardized MLCommons hazards taxonomy and designed to support multimodal Llama 4 capabilities. Specifically, it combines features from previous Llama Guard models, providing content moderation for English and multiple supported languages, along with enhanced capabilities to handle mixed text-and-image prompts, including multiple images. Additionally, Llama Guard 4 is integrated into the Llama Moderations API, extending robust safety classification to text and images. Llama Guard 4 12B runs on the Geek Hub API (OpenAI-compatible). Model id: meta-llama/llama-guard-4-12b.
Is Llama Guard 4 12B free?
No. Input is $0.1962 per 1M tokens and output is $0.1962 per 1M tokens on Geek Hub (markup included).
What is the context length of Llama Guard 4 12B?
Llama Guard 4 12B has a 1M tokens context window. It supports up to 16,384 completion tokens.
Does Llama Guard 4 12B support tool calling and structured outputs?
Llama Guard 4 12B does not advertise tool calling on this endpoint. It also supports structured outputs via a JSON schema in response_format.
When was Llama Guard 4 12B released?
Llama Guard 4 12B was released on 2025-04-30.

More models from Meta