Skip to content

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

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

Release date:

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

Ask about this model

Pricing

Catalog rates in USD

Ask about the rates that apply to your workspace before requesting access.
Input
$0.18 / M Tokens
Output
$0.18 / M Tokens

API examples

Use a model ID and API address enabled for your workspace.

import OpenAI from 'openai';

if (!process.env.OPENSI_API_KEY) throw new Error('Set OPENSI_API_KEY');
const client = new OpenAI({
  apiKey: process.env.OPENSI_API_KEY,
  baseURL: 'https://llm.opensi.com.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!' }],
  });
  if (response.error) throw new Error(response.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

On this page

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 OpenSIAI 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.opensi.com.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.opensi.com.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.opensi.com.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

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

Workspace access

Include the model ID when you contact OpenSI about availability and token rates.

Frequently Asked Questions about Llama Guard 4 12b

Related LLM APIs