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

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

Release date: 2025-04-30

163,840 context · $0.18/M input tokens · $0.18/M output tokens

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...

Pricing

Pay-per-use

No upfront costs, pay only for what you use

Input$0.18 / M Tokens
Output$0.18 / M Tokens

Try the model

meta-llama/llama-guard-4-12b
Online
meta
Hi! I am a helpful AI assistant. What can I do for you?
Ready to use this model in a local coding agent?Agent Setup

API Usage

Use the following code examples to integrate with our API:

import OpenAI from 'openai';

if (!process.env.WAVESPEED_API_KEY) throw new Error('Set WAVESPEED_API_KEY');
const client = new OpenAI({
  apiKey: process.env.WAVESPEED_API_KEY,
  baseURL: 'https://llm.wavespeed.ai/v1',
  timeout: 120_000,
  maxRetries: 0,
});

try {
  const response = await client.chat.completions.create({
    model: 'meta-llama/llama-guard-4-12b',
    messages: [{ role: 'user', content: 'Hello!' }],
  });
  const body = response as typeof response & { error?: { message?: string } };
  if (body.error) throw new Error(body.error.message || 'LLM generation failed');
  console.log(response.choices[0]?.message?.content ?? '');
} catch (error) {
  console.error('LLM request failed:', error);
  process.exitCode = 1;
}

Model Introduction

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...

This model is available through the WaveSpeed AI OpenAI-compatible API for chat completions and compatible application workflows.


Why It Looks Great

  • text+image->text architecture for Image, Text to Text workloads
  • 163840 context window for long prompts, document analysis, and multi-turn workflows
  • Vision input support for image understanding and multimodal tasks

Key Features

  • Context Window: 163840 tokens
  • Max Input: 147456 tokens
  • Max Output: 16384 tokens
  • Vision: Supported
  • Function Calling: Not listed
  • Structured Outputs: Not listed
  • Image Generation: Not listed
  • Audio Input: Not listed
  • Supported Parameters: frequency_penalty, logit_bias, max_tokens, min_p, presence_penalty, repetition_penalty, seed, stop, temperature, top_k, top_p

Specifications

SpecificationValue
Providermeta
Model TypeChat Completions model
Architecturetext+image->text
Context Window163840 tokens
Max Input147456 tokens
Max Output16384 tokens
InputImage, Text
OutputText
VisionSupported
Function CallingNot listed
Structured OutputsNot listed
Release DateApril 30, 2025

How to Use

  1. Write your prompt - describe the task, provide context, and specify the desired output format.
  2. Submit - the model processes your request and returns the response.

API Integration

Base URL: https://llm.wavespeed.ai/v1 API Endpoint: chat/completions Model ID: meta-llama/llama-guard-4-12b


API Usage

Python SDK

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_API_KEY",
    base_url="https://llm.wavespeed.ai/v1"
)

response = client.chat.completions.create(
    model="meta-llama/llama-guard-4-12b",
    messages=[{"role": "user", "content": "Hello!"}]
)

print(response.choices[0].message.content)

cURL

curl https://llm.wavespeed.ai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "meta-llama/llama-guard-4-12b",
    "messages": [{"role": "user", "content": "Hello!"}]
  }'

Notes

  • Model: meta-llama/llama-guard-4-12b
  • Provider: meta

Info

Providermeta
Typellm

Supported Functionality

Input
TextImage
Output
Text
Context163,840
Max Output16,384
Vision✓ Supported
Function Calling-

API Access Guide

Base URLhttps://llm.wavespeed.ai/v1
API Endpointchat/completions
Model IDmeta-llama/llama-guard-4-12b

Llama Guard 4 12b API

meta-llama/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...

Input

$0.18 /M

Output

$0.18 /M

Context

164K

Max Output

16K

Vision

Supported

Try Llama Guard 4 12b on WaveSpeedAI

Access Llama Guard 4 12b through our unified API — OpenAI-compatible, no cold starts, transparent pricing.

Frequently Asked Questions about Llama Guard 4 12b

How much does Llama Guard 4 12b cost via the API?+

Pricing on WaveSpeedAI: $0.18 per million input tokens and $0.18 per million output tokens. Prompt caching and batch processing are billed separately and reduce effective cost on long, repetitive workloads.

What is the context window of Llama Guard 4 12b?+

Llama Guard 4 12b supports up to 164K tokens of context with up to 16K tokens of output per request.

Is Llama Guard 4 12b OpenAI-compatible?+

WaveSpeedAI exposes Llama Guard 4 12b at https://llm.wavespeed.ai/v1 through the OpenAI-compatible Chat Completions interface. Most OpenAI SDK clients work by changing the base URL and API key; optional fields depend on the selected model.

How do I get started with Llama Guard 4 12b?+

Sign in to WaveSpeedAI, create an API key in Access Keys, then send a request to https://llm.wavespeed.ai/v1/chat/completions with the model id shown above. Check the current model catalog for availability, capabilities, and pricing.

Related LLM APIs