Content moderation, safety check: Llama Guard 3
Classify a text as safe or unsafe with Meta's Llama Guard 3 and name the hazard categories it falls into (violent and non-violent crimes, sexual content, child exploitation, hate, self-harm, weapons, privacy, defamation, elections and others; 14 in all). Up to 8,000 characters. Also available in the OpenAI moderation shape at /v1/moderations. Use to screen user messages, model outputs or content before an agent posts or acts on it.
Inputs
| Name | Type | Description |
|---|---|---|
text (required) | string | The text to classify (up to 8,000 characters) |
Request
Over HTTP, with a card key from /credits:
curl -H "Authorization: Bearer adt_…" "https://agent-data-tools.revmesh2074.workers.dev/ai/moderation?text=How%20do%20I%20bake%20sourdough%20bread%20at%20home%3F"
Or one of your 25 free calls, no key:
curl "https://agent-data-tools.revmesh2074.workers.dev/ai/moderation?text=How%20do%20I%20bake%20sourdough%20bread%20at%20home%3F&trial=1"
Without a key, the same URL answers 402 Payment Required with x402 and MPP terms, so an agent with a wallet pays per call in USDC (Base, Polygon, Arbitrum or Solana over x402; Base or Tempo over MPP) and retries.
Example result
{
"flagged": false,
"categories": [],
"model": "@cf/meta/llama-guard-3-8b"
}
From an AI agent (MCP)
Add the MCP server to Claude, Cursor or any MCP client. This tool is ai_moderation, and the first 25 successful calls are free:
https://agent-data-tools.revmesh2074.workers.dev/mcp