> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omnifence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Text moderation

> Screen text for policy violations

Text moderation evaluates text against your configured moderation policies, including any custom
categories you have configured. Text judged prohibited is rejected, and the reason is returned on
the completed job.

## Input

Submit a `multipart/form-data` request with:

| Field         | Type   | Required | Description                              |
| ------------- | ------ | -------- | ---------------------------------------- |
| `text`        | string | Yes      | The text to moderate.                    |
| `webhook_url` | string | No       | URL to receive the result on completion. |

```bash theme={null}
curl -X POST https://api.omnifence.ai/api/v1/moderate/text \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "text=A sunset over the ocean"
```

## How it's checked

The text is checked against your policy configuration and every enabled
[custom category](/moderation/categories#custom-categories) on your account. If it is judged
prohibited, the job is rejected with `is_prohibited: true` and a short `reason`. When a custom
category caused the rejection, the `reason` names it by slug.

## Output

```json theme={null}
{
  "is_prohibited": true,
  "reason": "The text requests sexual content involving a minor.",
  "job_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "type": "text",
  "status": "completed",
  "created_at": "2026-05-19T12:00:00.000Z",
  "completed_at": "2026-05-19T12:00:01.500Z"
}
```

When `is_prohibited` is `true`, `reason` explains why the text was prohibited. Text that passes
returns `is_prohibited: false` with no `reason`. See [decision logic](/moderation/decisions) for how
the prohibition decision is determined.
