---
title: Llama Guard 3 8B API | Text Generation | ModelsLab
description: Build with Llama Guard 3 8B API by Meta Llama. Text generation, chat, code, and reasoning. Pay-per-use. Free tier.
url: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/meta-llama/meta-llama-llama-guard-3-8b/api.md
canonical: https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/meta-llama/meta-llama-llama-guard-3-8b/api.md
type: product
component: Playground/LLM/Index
generated_at: 2026-05-13T10:53:54.743939Z
---

Llama Guard 3 8B
---

 [LLMs.txt](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-llama-guard-3-8b/llms.txt) [.md](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/meta-llama/meta-llama-llama-guard-3-8b.md)

meta-llama-llama-guard-3-8b meta-llama Closed Source Model $0.255000 / call

Llama Guard 3 8B
---

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

### Llama Guard 3 8B

meta-llama meta-llama-llama-guard-3-8b

Copy model ID

PricingInput $0.48 / 1M tokens

Output $0.03 / 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)

[Q7](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-72B-Instruct)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen2.5 72B Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2.5-72B-Instruct)

[OG](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-4o-search-preview)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [OpenAI: GPT-4o Search Preview

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/openai-gpt-4o-search-preview)

[FC](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/facebook-cwm)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Facebook CWM

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/facebook-cwm)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen2.5-vl-72b-instruct)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen: Qwen2.5 VL 72B Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen2.5-vl-72b-instruct)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-coder-plus)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Qwen: Qwen3 Coder Plus

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/qwen-qwen3-coder-plus)

[Q2](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2-72B)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Qwen 2 (72B)

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/Qwen-Qwen2-72B)

[NH](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/nousresearch-hermes-3-llama-3.1-405b)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Nous: Hermes 3 405B Instruct

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/nousresearch-hermes-3-llama-3.1-405b)

[ML](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/meta-llama-Llama-3.3-70B-Instruct-Turbo-test)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Meta Llama 3.3 70B Instruct Turbo

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/meta-llama-Llama-3.3-70B-Instruct-Turbo-test)

[ML](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-llama-4-maverick)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Meta: Llama 4 Maverick

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/meta-llama-llama-4-maverick)

[QQ](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/alibaba_cloud/qwen-qwen3.5-397b-a17b)[Alibaba](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/alibaba_cloud)

 [Qwen: Qwen3.5 397B A17B

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/alibaba_cloud/qwen-qwen3.5-397b-a17b)

[G4](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/zai-org-GLM-4.5-Air-FP8)[Together AI](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai)

 [Glm 4.5 Air Fp8

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/together_ai/zai-org-GLM-4.5-Air-FP8)

[AA](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/arcee-ai-maestro-reasoning)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Arcee AI: Maestro Reasoning

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/arcee-ai-maestro-reasoning)

[ML](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-large-2407)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Mistral Large 2407

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-mistral-large-2407)

[MP](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-pixtral-large-2411)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Mistral: Pixtral Large 2411

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/mistralai-pixtral-large-2411)

[SL](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/sao10k-l3-lunaris-8b)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Sao10K: Llama 3 8B Lunaris

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/sao10k-l3-lunaris-8b)

[RF](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/rekaai-reka-flash-3)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [Reka Flash 3

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/rekaai-reka-flash-3)

[![GPT 5.1](https://images.stablediffusionapi.com/?Image=https://assets.modelslab.ai/generations/fad83520-47a8-4059-b4b9-b32adf4d0be7.png)](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/openai/gpt5.1)[Open Ai](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/openai)

 [GPT 5.1

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/openai/gpt5.1)

[MM](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/minimax-minimax-m2.7)[Open Router](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router)

 [MiniMax: MiniMax M2.7

Closed Source Model](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router/minimax-minimax-m2.7)

About Llama Guard 3 8B
---

Llama Guard 3 is a Llama-3.1-8B 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)...

### Technical Specifications

Model IDmeta-llama-llama-guard-3-8bCategoryLLM ModelsTaskText GenerationPrice$0.255000 per million tokensAddedFebruary 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 Llama Guard 3 8B 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-3-8b",
        "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>
```

View the [full API documentation](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/meta-llama/meta-llama-llama-guard-3-8b/api) for SDKs, code examples in Python, JavaScript, and more.

### Pricing

Llama Guard 3 8B API costs $0.255000 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 Llama Guard 3 8B](https://modelslab-frontend-v2-927501783998.us-east4.run.app/llama-guard-3-8b) [Browse LLM Models](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models?feature=llmaster) [More from Meta Llama](https://modelslab-frontend-v2-927501783998.us-east4.run.app/models/open_router) [View Pricing](https://modelslab-frontend-v2-927501783998.us-east4.run.app/pricing)

Llama Guard 3 8B FAQ
---

### What is Llama Guard 3 8B?

Llama Guard 3 is a Llama-3.1-8B 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)...

### How do I use the Llama Guard 3 8B API?

You can integrate Llama Guard 3 8B 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-3-8b" in your API requests. We provide SDKs for Python, JavaScript, and cURL examples in the API documentation.

### How much does Llama Guard 3 8B cost?

Llama Guard 3 8B costs $0.255000 per million tokens. ModelsLab uses pay-per-use pricing with no minimum commitments. A free tier is available to get started.

### What is the Llama Guard 3 8B model ID?

The model ID for Llama Guard 3 8B is "meta-llama-llama-guard-3-8b". Use this ID in your API requests to specify this model.

### Does Llama Guard 3 8B have a free tier?

Yes, ModelsLab offers a free tier that lets you try Llama Guard 3 8B 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-05-13*