---
title: Meta: Llama Guard 4 12B API | Text Generation | ModelsLab
description: 12B parameter multimodal LLM safety classifier for text/image content moderation in prompts/responses, 164K context window, MLCommons-aligned.[1][2][4]
url: https://modelslab.com/models/meta/meta-llama-llama-guard-4-12b.md
canonical: https://modelslab.com/models/meta/meta-llama-llama-guard-4-12b
type: product
component: Playground/LLM/Index
generated_at: 2026-07-19T20:12:14.900503Z
---

Meta: Llama Guard 4 12B
---

 [LLMs.txt](https://modelslab.com/models/meta/meta-llama-llama-guard-4-12b/llms.txt) [.md](https://modelslab.com/models/meta/meta-llama-llama-guard-4-12b.md)

Meta: Llama Guard 4 12B
---

Choose a prompt below to get started or type your own message

 Explain quantum computing in simple terms

 Write a Python function to sort a list

 Create a marketing email for a SaaS product

 Compare REST vs GraphQL APIs

Send

### Meta: Llama Guard 4 12B

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

Copy model ID

PricingInput $0.18 / 1M tokens

Output $0.18 / 1M tokens

API EndpointsOpenAI Compatible

`https://modelslab.com/api/v7/llm/chat/completions`Endpoint

Anthropic Compatible

`https://modelslab.com/api/v7/llm/v1/messages`Messages

`https://modelslab.com/api/v7/llm/v1/messages/count_tokens`Count Tokens

`https://modelslab.com/api/v7/llm/v1/models`Models

Use with Claude Code

cURL Example

ParametersSystem MessageYou are a helpful AI assistant specialized in providing accurate and detailed responses.

Temperature0.7

Max Tokens1000

Top P0.9

Frequency Penalty0

Presence Penalty0

Model Info

Support

Related Models
---

Discover similar models you might be interested in

 [View all LLM Models](https://modelslab.com/models?feature=llmaster)

[#### openai/OpenAI: gpt-oss-120b

openai-gpt-oss-120b

From $0.10/M tokens](https://modelslab.com/models/openai/openai-gpt-oss-120b)

[#### meta/Meta Llama 3.2 90B Vision Instruct Turbo

meta-llama-Llama-3.2-90B-Vision-Instruct-Turbo

From $1.44/M tokens](https://modelslab.com/models/meta/meta-llama-Llama-3.2-90B-Vision-Instruct-Turbo)

[#### qwen/Qwen2.5 Coder 32B Instruct

qwen-qwen-2.5-coder-32b-instruct

From $0.83/M tokens](https://modelslab.com/models/qwen/qwen-qwen-2.5-coder-32b-instruct)

[#### z-ai/Z.ai: GLM 4.7

z-ai-glm-4.7

From $1.07/M tokens](https://modelslab.com/models/z-ai/z-ai-glm-4.7)

[#### pearl-ai/Pearl-ai Gemma-4-31B-it-pearl

pearl-ai-gemma-4-31b-it

From $0.57/M tokens](https://modelslab.com/models/pearl-ai/pearl-ai-gemma-4-31b-it)

[#### amazon/Amazon: Nova 2 Lite

amazon-nova-2-lite-v1

From $1.40/M tokens](https://modelslab.com/models/amazon/amazon-nova-2-lite-v1)

[#### qwen/Qwen QwQ-32B

Qwen-QwQ-32B

From $1.20/M tokens](https://modelslab.com/models/qwen/Qwen-QwQ-32B)

[#### qwen/Qwen: Qwen3 VL 30B A3B Thinking

qwen-qwen3-vl-30b-a3b-thinking

From $0.84/M tokens](https://modelslab.com/models/qwen/qwen-qwen3-vl-30b-a3b-thinking)

[#### qwen/Qwen: Qwen3.6 Plus

qwen-qwen3.6-plus

From $1.14/M tokens](https://modelslab.com/models/qwen/qwen-qwen3.6-plus)

[#### nvidia/NVIDIA: Nemotron 3 Nano 30B A3B

nvidia-nemotron-3-nano-30b-a3b

From $0.13/M tokens](https://modelslab.com/models/nvidia/nvidia-nemotron-3-nano-30b-a3b)

[#### inclusionai/inclusionAI: Ling-2.6-1T

inclusionai-ling-2.6-1t

From $0.35/M tokens](https://modelslab.com/models/inclusionai/inclusionai-ling-2.6-1t)

[#### google/Google: Gemini 2.5 Pro

google-gemini-2.5-pro

From $5.63/M tokens](https://modelslab.com/models/google/google-gemini-2.5-pro)

[#### qwen/Qwen: Qwen2.5 7B Instruct

qwen-qwen-2.5-7b-instruct

From $0.07/M tokens](https://modelslab.com/models/qwen/qwen-qwen-2.5-7b-instruct)

[#### anthropic/Anthropic: Claude Opus 4.1

anthropic-claude-opus-4.1

From $45.00/M tokens](https://modelslab.com/models/anthropic/anthropic-claude-opus-4.1)

[#### qwen/Qwen2.5 72B Instruct Turbo

Qwen-Qwen2.5-72B-Instruct-Turbo

From $1.20/M tokens](https://modelslab.com/models/qwen/Qwen-Qwen2.5-72B-Instruct-Turbo)

[#### openai/OpenAI: GPT-4o (2024-11-20)

openai-gpt-4o-2024-11-20

From $6.25/M tokens](https://modelslab.com/models/openai/openai-gpt-4o-2024-11-20)

[#### amazon/Amazon: Nova Pro 1.0

amazon-nova-pro-v1

From $2.00/M tokens](https://modelslab.com/models/amazon/amazon-nova-pro-v1)

[#### google/Gemini 2.5 Flash

gemini-2.5-flash

From $1.40/M tokens](https://modelslab.com/models/google/gemini-2.5-flash)

Open Source Alternatives
---

Explore open-source models that offer similar capabilities with full transparency and flexibility

 [View all open source models](https://modelslab.com/models?feature=llm&provider=open-source-models)

[MU

Popular](https://modelslab.com/models/modelslab/uncensored-chat)[ModelsLab](https://modelslab.com/models/modelslab)

 [Modelslab: Uncensored Chat

Open Source Model](https://modelslab.com/models/modelslab/uncensored-chat)

About Meta: 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...

### Technical Specifications

Model IDmeta-llama-llama-guard-4-12b

CategoryLLM Models

TaskText Generation

Price$0.18 per million tokens

AddedFebruary 20, 2026

### Key Features

- Chat completion and multi-turn conversation API
- Streaming response with token-by-token output
- Function calling and tool use support
- System prompts and role-based messaging
- JSON mode and structured output

### Quick Start

Integrate Meta: Llama Guard 4 12B into your application with a single API call. Get your API key from the [pricing page](https://modelslab.com/pricing) to get started.

PythonJavaScriptcURLPHP

```
<code>import requests
import json

url = "https://modelslab.com/api/v7/llm/chat/completions"

headers = {
    "Content-Type": "application/json"
}

data = {
        "model_id": "meta-llama-llama-guard-4-12b",
        "messages": [
            {
                "role": "user",
                "content": "Hello!"
            }
        ],
        "max_tokens": 1000,
        "key": "YOUR_API_KEY"
    }

try:
    response = requests.post(url, headers=headers, json=data)
    response.raise_for_status()  # Raises an HTTPError for bad responses (4XX or 5XX)
    result = response.json()
    print("API Response:")
    print(json.dumps(result, indent=2))
except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except Exception as err:
    print(f"Other error occurred: {err}")</code>
```

### Pricing

Meta: Llama Guard 4 12B API costs $0.180000 per million tokens. Pay only for what you use with no minimum commitments. [View pricing plans](https://modelslab.com/pricing)

### Use Cases

- AI chatbots and virtual assistants
- Code generation and developer tools
- Content writing and copywriting automation
- Data analysis, summarization, and extraction

[Learn more about Meta: Llama Guard 4 12B](https://modelslab.com/meta-llama-guard-4-12b) [Browse LLM Models](https://modelslab.com/models?feature=llmaster) [More from Meta](https://modelslab.com/models/open_router) [View Pricing](https://modelslab.com/pricing)

Meta: Llama Guard 4 12B FAQ
---

### What is Meta: 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...

### How do I use the Meta: Llama Guard 4 12B API?

You can integrate Meta: Llama Guard 4 12B into your application with a single API call. Sign up on ModelsLab to get your API key, then use the model ID "meta-llama-llama-guard-4-12b" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does Meta: Llama Guard 4 12B cost?

Meta: Llama Guard 4 12B costs $0.180000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the Meta: Llama Guard 4 12B model ID?

The model ID for Meta: Llama Guard 4 12B is "meta-llama-llama-guard-4-12b". Use this ID in your API requests to specify this model.

### Does Meta: Llama Guard 4 12B have a free tier?

Yes, ModelsLab offers a free tier that lets you try Meta: Llama Guard 4 12B and other AI models. Sign up to get free API credits and start building immediately.

---

*This markdown version is optimized for AI agents and LLMs.*

**Links:**
- [Website](https://modelslab.com)
- [API Documentation](https://docs.modelslab.com)
- [Blog](https://modelslab.com/blog)

---
*Generated by ModelsLab - 2026-07-20*