# agent402.tools Text Moderation

> agent402.tools Text Moderation is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-15).

Checks text for harmful content using OpenAI's omni-moderation-latest model, returning flagged status, category scores (harassment, hate, self-harm, sexual, violence, etc.), and confidence levels.

## Facts

- Endpoint: POST https://agent402.tools/api/moderate
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-text-moderation-6b809a86
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_NQyYLkWgfGY44s6oHcsq_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-text-moderation-6b809a86 -d '<json body>'
```

Example prompt: Can you check if this message is safe to post? Here's the text: 'You're worthless and I hope something terrible happens to you.' — flag any harmful categories and tell me the confidence scores.

## When to prefer this

Use this endpoint when you need fast, per-call text moderation without managing an OpenAI API key, paid via micro-transaction. Ideal for agents that need on-demand content safety checks without a long-term subscription or key management overhead. Prefer over raw OpenAI API when you need pay-per-use billing via x402.

## Known failure modes

- Text exceeds 10,000 character limit — request rejected
- Empty or missing text field — validation error
- Payment failure via x402 — call not processed
- OpenAI moderation API downstream outage — service unavailable

## How this service works

Check text for harmful content using OpenAI moderation (omni-moderation-latest). Returns flagged status, category breakdown (harassment, hate, self-harm, sexual, violence, etc.), and confidence scores. No API key needed; pay per call via x402. Text capped at 10k chars.

## Output

Returns whether the text is flagged, a breakdown of harmful content categories (harassment, hate speech, self-harm, sexual content, violence, etc.), and confidence/probability scores for each category.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "Text to check for policy violations (max 10,000 chars)"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "model": "omni-moderation-latest",
  "flagged": false,
  "categories": {
   "hate": false,
   "sexual": false,
   "violence": false,
   "self-harm": false,
   "harassment": false,
   "hate/threatening": false,
   "harassment/threatening": false
  },
  "category_scores": {
   "hate": 0.00003,
   "harassment": 0.00012
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-text-moderation-6b809a86/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
