---
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-frontend-v2-927501783998.us-east4.run.app/models/meta/meta-llama-llama-guard-4-12b.md
canonical: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/meta/meta-llama-llama-guard-4-12b.md
type: product
component: Playground/LLM/Index
generated_at: 2026-07-11T23:04:31.133523Z
---

Meta: Llama Guard 4 12B
---

 [LLMs.txt](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-llama-guard-4-12b/llms.txt) [.md](https://modelslab-frontend-v2-927501783998.us-east4.run.app/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-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster)

[#### open\_router/Qwen: Qwen3 Next 80B A3B Instruct

qwen-qwen3-next-80b-a3b-instruct

From $0.59/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-next-80b-a3b-instruct)

[#### open\_router/Z.ai: GLM 4.5

z-ai-glm-4.5

From $1.40/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/z-ai-glm-4.5)

[#### open\_router/Google: Nano Banana 2 Lite (Gemini 3.1 Flash Lite Image)

google-gemini-3.1-flash-lite-image

From $0.88/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-gemini-3.1-flash-lite-image)

[#### open\_router/Qwen: Qwen3 Max

qwen-qwen3-max

From $2.34/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-max)

[#### open\_router/MoonshotAI: Kimi K2.5

moonshotai-kimi-k2.5

From $1.20/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/moonshotai-kimi-k2.5)

[#### open\_router/Qwen: Qwen3 Coder Plus

qwen-qwen3-coder-plus

From $1.95/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-coder-plus)

[#### open\_router/MiniMax: MiniMax-01

minimax-minimax-01

From $0.65/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/minimax-minimax-01)

[#### open\_router/Google: Gemini 3.1 Flash Lite

google-gemini-3.1-flash-lite

From $0.88/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/google-gemini-3.1-flash-lite)

[#### open\_router/MythoMax 13B

gryphe-mythomax-l2-13b

From $0.06/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/gryphe-mythomax-l2-13b)

[#### alibaba\_cloud/Qwen: Qwen3.5-27B

qwen-qwen3.5-27b

From $1.35/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/alibaba_cloud/qwen-qwen3.5-27b)

[#### open\_router/Baidu: ERNIE 4.5 VL 424B A47B 

baidu-ernie-4.5-vl-424b-a47b

From $0.83/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/baidu-ernie-4.5-vl-424b-a47b)

[#### open\_router/Amazon: Nova Micro 1.0

amazon-nova-micro-v1

From $0.09/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/amazon-nova-micro-v1)

[#### open\_router/MoonshotAI: Kimi K2.6

moonshotai-kimi-k2.6

From $2.04/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/moonshotai-kimi-k2.6)

[#### open\_router/ByteDance: UI-TARS 7B 

bytedance-ui-tars-1.5-7b

From $0.15/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/bytedance-ui-tars-1.5-7b)

[#### open\_router/Mistral Large

mistralai-mistral-large

From $4.00/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-large)

[#### open\_router/Perceptron: Perceptron Mk1

perceptron-perceptron-mk1

From $0.82/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/perceptron-perceptron-mk1)

[#### open\_router/Mistral: Saba

mistralai-mistral-saba

From $0.40/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-saba)

[#### open\_router/Anthropic Claude Haiku Latest

anthropic-claude-haiku-latest

From $3.00/M tokens](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/anthropic-claude-haiku-latest)

Open Source Alternatives
---

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

 [View all open source models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llm&provider=open-source-models)

[MU

Popular](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/modelslab/uncensored-chat)[ModelsLab](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/modelslab)

 [Modelslab: Uncensored Chat

Open Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/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-frontend-v2-927501783998.us-east4.run.app/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-frontend-v2-927501783998.us-east4.run.app/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-frontend-v2-927501783998.us-east4.run.app/meta-llama-guard-4-12b) [Browse LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster) [More from Meta](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router) [View Pricing](https://modelslab-frontend-v2-927501783998.us-east4.run.app/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-12*