We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.

Meta: Llama Guard 4 12B

meta-llama/llama-guard-4-12b
TextInput: image · text164KAdded Apr 30, 2025

Try Meta: Llama Guard 4 12B now

Runs on your balance at the prices above. New accounts start with free usage.

One API. Every model.

5 of 5 free messages left today. A free account adds free usage and an API key.Create free accountSign in

Session cost $0.00

Meta: Llama Guard 4 12B at a glance

  • Input price is 60% lower than the median of 434 Text models.
  • Context window of 163,840 tokens, enough for long documents and multi-turn conversations.
  • Accepts images as input (vision).
  • A typical request (1,000 input / 500 output tokens) costs about $0.000945.

About Meta: Llama Guard 4 12B

Meta: Llama Guard 4 12B is a content safety classification model from Meta. It is derived from Llama 4 Scout, a multimodal pretrained model, and then fine tuned specifically for content safety classification. Meta released it on 30 April 2025, and it belongs to the text category on api14. If you have used earlier Llama Guard versions, this one follows the same general idea of classifying content, but it is built on a newer multimodal base.

The model accepts both text and images as input and returns text as output. That means you can send a prompt, an image, or a combination of the two and receive a classification result in text form. It has a context window of 163,840 tokens, which is large enough to hold long conversations, lengthy documents or several images alongside their accompanying text in a single request. The maximum output is 16,384 tokens, and the knowledge cutoff is 31 August 2024.

The practical uses follow directly from those capabilities. You can place Llama Guard 4 12B in front of or behind another model to check whether user input or generated output is safe. Because it handles images as well as text, it can also be used to classify visual content, for example moderating user uploaded images or checking image and text pairs in a multimodal pipeline. Long context support makes it workable for reviewing entire chat threads or long documents rather than only single short messages.

You call it through api14's OpenAI-compatible API using the model id "meta-llama/llama-guard-4-12b". The supported request parameters are frequency_penalty, logit_bias, max_tokens, min_p, presence_penalty, repetition_penalty, seed, stop, temperature, top_k and top_p. If you already have code written against the OpenAI chat completions format, you can point it at api14 and change the model id to start sending requests.

One thing to keep in mind is what the model is for. It is fine tuned for content safety classification, not for general conversation, creative writing or reasoning tasks. If you need a model to answer questions, write code or hold a dialogue with users, a general purpose model will fit better. Llama Guard 4 12B is best treated as a dedicated classifier that sits alongside those models rather than as a replacement for them.

How to call the Meta: Llama Guard 4 12B API

  1. Create an API key in your dashboard.
  2. Install the official openai SDK for your language.
  3. Set baseURL to https://api14.com/api/v1 and model to "meta-llama/llama-guard-4-12b".
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://api14.com/api/v1",
  apiKey: process.env.API14_API_KEY,
});

const result = await client.chat.completions.create({
  "model": "meta-llama/llama-guard-4-12b",
  "messages": [
    {
      "role": "user",
      "content": "Explain vector databases in two sentences."
    }
  ]
});
console.log(result.choices[0].message.content);

Supported parameters

frequency_penaltylogit_biasmax_tokensmin_ppresence_penaltyrepetition_penaltyseedstoptemperaturetop_ktop_p

Specifications

Context length
163,840
Max output
16,384
Input
image, text
Output
text
Knowledge cutoff
2024-08-31

Requests on api14 · last 7 days

10-1710-1810-1910-2010-2110-2210-23

Meta: Llama Guard 4 12B: frequently asked questions

How much does the Meta: Llama Guard 4 12B API cost?
Meta: Llama Guard 4 12B costs Input $0.63 / 1M tokens. It is charged from your USD balance only for successful requests; failed requests are free.
What is the context window of Meta: Llama Guard 4 12B?
Meta: Llama Guard 4 12B reads up to 163,840 tokens per request: prompt, history and documents together. It writes up to 16,384 output tokens per response.
What can Meta: Llama Guard 4 12B do?
Meta: Llama Guard 4 12B accepts image, text and returns text.
How do I call Meta: Llama Guard 4 12B from my code?
Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "meta-llama/llama-guard-4-12b". No other code changes. Copy a ready example from the code panel on this page.
What are alternatives to Meta: Llama Guard 4 12B?
Comparable Text models at a similar price: Qwen: Qwen3 14B, Qwen: Qwen3 32B, Xiaomi: MiMo-V2.5. Each runs through the same API key, so switching is one string.

Meta: Llama Guard 4 12B community

New topic

This community has no topics yet. Open the first one about Meta: Llama Guard 4 12B.