Llama Prompt Guard 2 86M

Meta
meta/llama-prompt-guard-2-86mOpen Weights

86M-parameter (mDeBERTa-base) multilingual classifier that detects prompt injection and jailbreak attempts

Benchmark Pricing$0.04 / 1M in$0.04 / 1M out$0.02 cache read
Context: 512 tokens•Max Output: 512 tokens•Released: 2025-04-29

TECHNICAL SPECIFICATIONS

Context Window512512 tokens
Max Output512512 tokens
LicenseLlama 4 Community LicenseSelf-hostable
Input Modalities
Text
Function / Tool CallingNot Supported
Structured OutputsPrompt Based

MODEL CONTEXT PROTOCOL (MCP) READINESS

⚠ Llama Prompt Guard 2 86M does not natively advertise tool-calling capabilities. When connecting to MCP servers, function calling must be handled via structured prompt injection.

MCP Context Window Recommendations

With a context capacity of 512 tokens, this model can handle compact tool sets. Consider keeping MCP server tool manifests minimal to preserve headroom.

API CALL INVOCATION EXAMPLE

// Example: Calling Llama Prompt Guard 2 86M via OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.META_API_KEY,
});

const response = await client.chat.completions.create({
  model: "meta/llama-prompt-guard-2-86m",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

console.log(response.choices[0].message.content);

PRICING BY PROVIDER

3 providers
Eden AIgroq/meta-llama/llama-prompt-guard-2-86m
$0.04 / $0.04$0.02 cache
Groqmeta-llama/llama-prompt-guard-2-86m
$0.04 / $0.04
Heliconellama-prompt-guard-2-86m
$0.01 / $0.01

Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.

Prompt Caching Active

This model supports prompt caching at $0.02 / 1M tokens, saving up to 50% on repetitive MCP tool definitions and system instructions.