> ## Documentation Index
> Fetch the complete documentation index at: https://zerogpu-claude-friendly-johnson-fww5io.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Moderation

> OpenAI-compatible content moderation, benchmarked against omni-moderation-latest.

Moderation models screen text for unsafe, harmful, or policy-sensitive content before it reaches your application or model workflow. Call the dedicated [Moderations API](/api-reference/moderations) (`POST /v1/moderations`) — a moderation model is routable only on this endpoint and returns OpenAI's native moderations envelope, so it drops into any pipeline written against `omni-moderation-latest`.

| Model                                                                                                                                                                                                                                                                                                                                                                                                       | Input /1M | Output /1M | Max tokens |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------: | ---------: | ---------: |
| <a href="/api-reference/models/zlm-v1-moderation-edge" style={{display:"inline-flex",alignItems:"center",gap:"0.5rem",textDecoration:"none",color:"inherit",wordBreak:"break-word",borderBottom:"none"}}><img src="https://models-favicon.zerogpu.ai/zlm-v1-iab-classify-edge-enriched/logo_dark.png" alt="zlm-v1-moderation-edge" width="22" height="22" noZoom /> <code>zlm-v1-moderation-edge</code></a> |    \$0.02 |     \$0.05 |        800 |

## zlm-v1-moderation-edge

> ZeroGPU's moderation model screens text for unsafe, harmful, or policy-sensitive content and returns the complete OpenAI 13-category taxonomy (a `flagged` verdict, per-category booleans, and calibrated `category_scores`), so it drops into any pipeline written against `omni-moderation-latest`. Under the hood it's an 86M-parameter DeBERTa encoder with a shared trunk feeding one binary safe/unsafe head and 13 category heads, with per-category thresholds calibrated on held-out validation data. In [head-to-head benchmarks](https://zerogpu.ai/benchmarks/moderation-edge) against OpenAI omni-moderation it wins the binary safe/unsafe decision (0.899 vs 0.853 F1) and 9 of 13 harm categories, with the largest gains on graphic violence, illicit content, and self-harm, while returning verdicts 1.2–1.8× faster at the median on production-range inputs, because inference is co-located at the edge instead of a round trip to a central API. Moderation sits inline in front of every response your app serves; this is the model that's fast and accurate enough to live there.

**References:** [Moderation benchmark](https://zerogpu.ai/benchmarks/moderation-edge) • [Terms](https://zerogpu.ai/terms) • [Privacy](https://zerogpu.ai/privacy-policy)

Send the text to classify as `input` — a string, an array of strings (one verdict per element), or an array of `{ "type": "text", "text": "…" }` content parts.

```bash Moderations API theme={null}
curl https://api.zerogpu.ai/v1/moderations \
  -H "content-type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-project-id: YOUR_PROJECT_ID" \
  -d '{
  "model": "zlm-v1-moderation-edge",
  "input": "I am so angry at this person that I want to hurt them. They are worthless and should be scared of what I might do next."
}'
```

The response is OpenAI's native moderations envelope — an `id`, the resolved `model`, and a `results` array (one entry per input). Each result carries a `flagged` verdict, per-category `categories` booleans, `category_scores` in `[0, 1]`, and `category_applied_input_types` (always `["text"]` for this text-only model), with all 13 categories present in OpenAI's order:

```json Response theme={null}
{
  "id": "modr-0a1b2c3d4e5f60718293a4b5c6d7e8f90",
  "model": "zlm-v1-moderation-edge",
  "results": [
    {
      "flagged": true,
      "categories": {
        "harassment": true,
        "harassment/threatening": true,
        "hate": false,
        "hate/threatening": false,
        "illicit": true,
        "illicit/violent": true,
        "self-harm": false,
        "self-harm/intent": false,
        "self-harm/instructions": false,
        "sexual": false,
        "sexual/minors": false,
        "violence": true,
        "violence/graphic": false
      },
      "category_scores": {
        "harassment": 0.82545,
        "harassment/threatening": 0.957703,
        "hate": 0.21574,
        "hate/threatening": 0.168273,
        "illicit": 0.732167,
        "illicit/violent": 0.780693,
        "self-harm": 0.015232,
        "self-harm/intent": 0.017179,
        "self-harm/instructions": 0.01807,
        "sexual": 0.035671,
        "sexual/minors": 0.094207,
        "violence": 0.665897,
        "violence/graphic": 0.198346
      },
      "category_applied_input_types": {
        "harassment": ["text"],
        "harassment/threatening": ["text"],
        "hate": ["text"],
        "hate/threatening": ["text"],
        "illicit": ["text"],
        "illicit/violent": ["text"],
        "self-harm": ["text"],
        "self-harm/intent": ["text"],
        "self-harm/instructions": ["text"],
        "sexual": ["text"],
        "sexual/minors": ["text"],
        "violence": ["text"],
        "violence/graphic": ["text"]
      }
    }
  ]
}
```
