Check text for safety categories with Llama Guard
moderateSafety check of a text or a chat turn with Llama Guard 3: safe or unsafe, and the violated categories (S1 to S14, named in plain words). Send text, or messages (up to 20 turns). Classifies only; it does not change or block anything. Price: $0.002 per successful call, paid with x402 (USDC on Base, Solana and 10 more networks); failed calls are not charged.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "moderate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | Text to check, up to 8,000 characters | |
| messages | No | Or chat turns: {role: user or assistant, content}, up to 20 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| safe | No | ||
| model | No | ||
| source | No | ||
| checkedAt | No | ||
| categories | No |