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

# Content Safety Endpoints

> Screen generation prompts for content safety before you generate

Content safety endpoints let you run a Waffo content safety check on a user's text prompt **before** your product generates an image or video. Send the prompt, receive a clear verdict, and generate only when the verdict is `allow`. The check is stateless — the prompt text is not retained after the response is returned.

This is the fastest way to satisfy the pre-generation moderation requirement in [AIGC compliance](/mor/account-reviews/aigc-compliance). Pair it with an output-stage check for full coverage.

## What it checks

The check screens the prompt for content that is unsafe to generate, with particular focus on child-unsafe material — the category every major AI generation platform intercepts. When the prompt matches one or more restricted categories, the check returns a non-`allow` verdict and lists the categories it matched.

## Verdicts

The `action` field carries the verdict. Continue to generation only on `allow`.

| `action` | Meaning                                          | What to do                                                        |
| -------- | ------------------------------------------------ | ----------------------------------------------------------------- |
| `allow`  | The prompt passed the check                      | Proceed to your generation model as normal                        |
| `review` | The prompt needs a closer look before a decision | Hold the request; a decision usually resolves within about 1 hour |
| `block`  | The prompt matched restricted content            | Do not generate; show the user a friendly message                 |

<Note>
  Treat `allow` as the only signal to proceed. Both `review` and `block` mean "do not generate yet."
</Note>

## Reason codes

The `reasonCode` field explains the verdict in machine-readable form.

| `reasonCode`         | Paired `action` | Meaning                                                                                          |
| -------------------- | --------------- | ------------------------------------------------------------------------------------------------ |
| `allowed`            | `allow`         | No restricted content detected                                                                   |
| `review_required`    | `review`        | Held for a closer look before a decision                                                         |
| `restricted_content` | `block`         | Matched one or more restricted categories                                                        |
| `service_degraded`   | `review`        | The moderation service was temporarily unavailable, so the request is held rather than generated |

<Note>
  When the moderation service is temporarily unavailable, the check returns `review` (with `service_degraded`) so that nothing is generated without a verdict. Retry the request rather than generating on a degraded response.
</Note>

## How to use it

<Steps>
  <Step title="Collect the user's prompt">
    Any text description your user submits for image or video generation.
  </Step>

  <Step title="Call scan-prompt before generating">
    Send the prompt to [`scan-prompt`](/api-reference/endpoints/content-safety/scan-prompt) and read the `action` field.
  </Step>

  <Step title="Act on the verdict">
    * `allow` → call your generation model.
    * `review` → hold the request and retry later; a decision usually resolves within about 1 hour.
    * `block` → don't generate; show a friendly message such as "This content doesn't meet our usage guidelines."
  </Step>
</Steps>

## Endpoints

<CardGroup cols={1}>
  <Card title="Scan Prompt" icon="shield-check" href="/api-reference/endpoints/content-safety/scan-prompt">
    Screen a generation prompt and receive an allow / review / block verdict.
  </Card>
</CardGroup>
