impulse

Llama Guard 4 12B

Open weightsModeration

Llama Guard 4 is a Llama 4 Scout-derived multimodal pretrained model, fine-tuned for content safety classification.

API id Llama-Guard-4-12BReleased 30 Apr 2025 (Apr 2025)
Input / 1M
$0.18
at DeepInfra
Output / 1M
$0.18
at DeepInfra
Context window
164K
tokens
Max output
164K
tokens per reply
Hosts
2
2 listings
Released
Apr 2025
30 Apr 2025

Pricing

List prices at DeepInfra, in US dollars per million tokens.

TierInput / 1MOutput / 1M
Standard$0.18$0.18

What it costs a month

At DeepInfra list prices, 30 days.

  • Chat assistant5,000 requests a day, 2K in / 0.5K out$67.50
  • RAG over documents2,000 requests a day, 8K in / 0.6K out$92.88
  • Coding agent1,000 requests a day, 40K in / 2K out$227
  • Overnight batch20,000 requests a day, 4K in / 0.4K out$475
Use your own numbers

Where to run it

2 hosts serve Llama Guard 4 12B. The comparison is on blended price, 3 parts input to 1 part output.

HostIn / out per 1M
DeepInfraInference
Llama-Guard-4-12B
$0.18 / $0.18
ReplicateInference
llama-guard-4-12b
$0.20 / $0.20
+11% vs headline

Capabilities

Core

  • Streaming
  • Function calling
  • JSON mode
  • Structured outputs

Multimodal

  • Vision
  • Image input
  • Audio
  • Image generation
  • Video

Advanced

  • Reasoning
  • Tool calling
  • MCP
  • Prompt caching
  • Batch API
  • Embeddings
Takes in
Text
Produces
Text
Open weights
License: Llama Community License
Runs in about 28.8 GB of GPU memory
Runtimes: Ollama, TGI, llama.cpp, vLLM

Cheaper alternatives

Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.

Same model, cheaper host

No host sells it for less than DeepInfra.

Smaller Meta models

No cheaper Meta model keeps its key capabilities.

Other frontier labs

No cheaper match from another frontier lab.

Open-weight picks

  • gpt-oss-safeguard-20b
    OpenAI · on Amazon Bedrock
    $0.07 / $0.20
    Has every key capability
    43% less
  • Llama Guard 3 1B
    Meta · on Fireworks AI
    $0.10 / $0.10
    Has every key capability
    44% less
  • Llama Guard 3 8B
    Meta · on Nebius AI Studio
    $0.02 / $0.06
    Has every key capability
    83% less

Call it

Using DeepInfra's API.

Python
from litellm import completion

response = completion(
    model="deepinfra/Llama-Guard-4-12B",
    messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)

Quick answers

How much does Llama Guard 4 12B cost?

On DeepInfra, Llama Guard 4 12B costs $0.18 per million input tokens and $0.18 per million output tokens.

Which APIs offer Llama Guard 4 12B?

Llama Guard 4 12B runs on 2 APIs: DeepInfra and Replicate.

What is Llama Guard 4 12B's context window?

164K tokens, with up to 164K tokens in one reply.

Is Llama Guard 4 12B being retired?

No retirement date is scheduled for it on any API we track.

What are cheaper alternatives to Llama Guard 4 12B?

Models that cost less and keep most of what it can do: gpt-oss-safeguard-20b on Amazon Bedrock (43% less). Savings are on a mix of 3 input tokens to 1 output token.

When was Llama Guard 4 12B released?

Meta released it on 30 Apr 2025.

What is Llama Guard 4 12B's API model id?

Use Llama-Guard-4-12B with DeepInfra. Other hosts use their own ids: llama-guard-4-12b on Replicate.

Sources

Raw catalog entry for Llama-Guard-4-12B on DeepInfra
{
  "max_input_tokens": 163840,
  "max_output_tokens": 163840,
  "input_cost_per_token": 1.8e-7,
  "output_cost_per_token": 1.8e-7,
  "litellm_provider": "deepinfra",
  "mode": "chat",
  "supports_tool_choice": false
}