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

# Request safety filtering

> Reject requests whose content matches moderation categories you choose — per request, with no policy setup, via the flagged_categories parameter.

**Request safety filtering lets a single request opt into content moderation** by naming the categories that should block it. Pass `flagged_categories` in the request body: abliteration.ai runs the last user message through moderation, and if the result intersects your list, the call is rejected with `400` before it reaches the model. No Policy Gateway subscription or policy setup is required.

This is the inline, per-request control. For org-wide governance that applies to every request on a project — including rewrites, redaction, allow/deny lists, and audit logs — use the [Policy Gateway](/policy-gateway/overview), where `flagged_categories` is one of the rule fields.

## Parameter

|           |                                                         |
| --------- | ------------------------------------------------------- |
| Field     | `flagged_categories` (also accepts `flaggedCategories`) |
| Location  | Top level of the request body                           |
| Type      | Array of category strings                               |
| Endpoints | `/v1/chat/completions`, `/v1/messages`                  |

## Categories

Per request, four categories are honored. Any other value is ignored.

| Value        | Blocks                                                  |
| ------------ | ------------------------------------------------------- |
| `harassment` | Abusive or insulting language toward a target.          |
| `hate`       | Derogatory or hateful content about a protected group.  |
| `illicit`    | Requests for wrongdoing, fraud, or prohibited activity. |
| `sexual`     | Sexual content involving explicit acts.                 |

<Note>
  The Policy Gateway rule of the same name supports the full OpenAI-moderation set, including granular child-safety, self-harm, and violence variants. See [policy rules](/policy-gateway/overview#what-a-rule-looks-at).
</Note>

## Always blocked

A minimal safety floor applies to **every** request, independent of `flagged_categories` — you cannot opt out of it, and it applies even when `flagged_categories` is omitted:

| Always blocked       | Rejection message                              |
| -------------------- | ---------------------------------------------- |
| Child sexual content | `Content flagged: Sexual harm against minors.` |
| Self-harm content    | `Content flagged: Self-harm.`                  |

These are the only categories abliteration.ai blocks by default. Everything else passes through unless you opt in via `flagged_categories` or a [policy](/policy-gateway/overview).

<Note>
  If a legitimate use case is blocked, email [help@abliteration.ai](mailto:help@abliteration.ai).
</Note>

## Example

<CodeGroup>
  ```sh curl (OpenAI) theme={"system"}
  curl https://api.abliteration.ai/v1/chat/completions \
    -H "Authorization: Bearer $ABLIT_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "abliterated-model",
      "messages": [{"role": "user", "content": "Hello"}],
      "flagged_categories": ["harassment", "hate", "illicit", "sexual"]
    }'
  ```

  ```sh curl (Anthropic) theme={"system"}
  curl https://api.abliteration.ai/v1/messages \
    -H "x-api-key: $ABLIT_KEY" \
    -H "anthropic-version: 2023-06-01" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "abliterated-model",
      "max_tokens": 1024,
      "messages": [{"role": "user", "content": "Hello"}],
      "flagged_categories": ["harassment", "hate", "illicit", "sexual"]
    }'
  ```
</CodeGroup>

## Rejection

When the moderation result intersects your list, the request is rejected with HTTP `400` and a message naming the triggered categories, for example `Content flagged: Harassment, Hate.` The model is never called and the request is not billed for completion tokens.
