> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://fastpix.com/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://fastpix.com/docs/_mcp/server.

# Getting started with moderation

This guide covers both ways to moderate a ready media asset, in the FastPix dashboard and with the API, and how to read the response so you can allow, review, or block the content. For what moderation detects and how the scores work, see [Content moderation](/in-video-ai/detect-nsfw-content-and-profanity).

> Note: You can generate AI features only for existing media. Upload and process your video first, then run moderation on the ready media.

\


## Prerequisites

* A FastPix account with an active workspace ([Activate your account](/getting-started/activate-your-account))
* A ready video asset in your workspace
* Your **Access Token ID** and **Secret Key** if you use the API

\


## Run content moderation from the FastPix dashboard

To run moderation without calling the API:

1. **Open the media item**: From the FastPix dashboard, go to **Media > \[your media item]** and open the Media Details page.

2) **Open the moderation tab**: On the Media Details page, click the **Moderation** tab to view the moderation controls and history.

3. **Run the check**: Click **Generate** to start moderation on the media.

4. **View the results**: When moderation completes, the detected categories and their confidence scores appear in the tab.

5) **Take action**: To block playback automatically, update the media `accessPolicy` or playback rules when a high-confidence detection appears. For manual review, forward the flagged categories to your review queue or ticketing system.

\


## Run content moderation with the API

Run moderation and fetch the results programmatically with the In-Video AI API. The video moderation API is asynchronous, so you trigger it, wait for the webhook or poll, then read the result. Both endpoints use Basic authentication with your Access Token ID and Secret Key.

### Trigger moderation

Send a `POST` to the [Moderate video content and detect profanity](/in-video-ai-api/content-moderation/create-ai-moderation) endpoint with the `mediaId` of a ready asset.

```bash
curl --request POST \
  --url https://api.fastpix.com/v1/ai/{mediaId}/moderation \
  --user '{Access_Token}:{Secret_Key}'
```

The response confirms that the job started:

```json
{
  "success": true,
  "data": {
    "id": "c695988b-ff84-42ae-bb21-10f284fedb0e"
  }
}
```

### Moderation configuration

The moderation API accepts an optional JSON configuration body for controlling audio and video moderation. Send it as the request body on the trigger `POST`.

```json
{
  "modalities": ["video", "audio"],
  "language_code": "te",
  "categories": [
    "violence",
    "sexual",
    "profanity",
    "threats",
    "harassment",
    "hate_speech"
  ],
  "thresholds": {
    "sexual": 0.4,
    "violence": 0.4,
    "profanity": 0.3,
    "threats": 0.3,
    "harassment": 0.3,
    "hate_speech": 0.3
  },
  "sampling": {
    "interval_seconds": 5
  }
}
```

#### Parameters

| Parameter                   | Description                                                                                                                                                                                                           |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `modalities`                | Specifies which media streams to moderate: `video`, `audio`, or both.                                                                                                                                                 |
| `language_code`             | Specifies the requested audio language. For example, `te` represents Telugu. See [Supported languages for audio moderation](/in-video-ai/detect-nsfw-content-and-profanity#supported-languages-for-audio-moderation). |
| `categories`                | Lists the content categories to consider during moderation.                                                                                                                                                           |
| `thresholds`                | Defines the score threshold for each category. Lower values make moderation more sensitive.                                                                                                                           |
| `sampling.interval_seconds` | Defines the target interval, in seconds, for video moderation sampling.                                                                                                                                               |

#### Supported categories

For the categories moderation can flag and what each one covers, see [Moderation categories](/in-video-ai/detect-nsfw-content-and-profanity#moderation-categories).

#### Behavior

When both modalities are selected:

* Video moderation analyzes sampled video frames.
* Audio moderation transcribes the audio in the original language.
* Audio timestamps are mapped back to the source transcript.
* Video and audio results are combined into a single moderation response.

The configuration body is optional. If you omit it, the API applies these defaults:

* **Modalities:** detected automatically from the media. A video that has an audio track is moderated on both tracks, an audio-only asset on audio, and a video-only asset on video.
* **Categories:** all supported categories.
* **Language code:** detected automatically from the audio.
* **Sampling interval:** 3 seconds.

### Wait for the result

Moderation runs in the background. Subscribe to the `video.media.ai.moderation.ready` webhook to be notified when the analysis completes, or poll the get-results endpoint.

### Get the moderation result

Send a `GET` to the [Get video moderation results](/in-video-ai-api/content-moderation/get-media-ai-moderation) endpoint.

```bash
curl --request GET \
  --url https://api.fastpix.com/v1/ai/{mediaId}/moderation \
  --user '{Access_Token}:{Secret_Key}'
```

\


## Understand the moderation response

The response contains a `moderation` object that summarizes the analysis and lists every flagged segment with its time range. A sample response for an unsafe video:

```json
{
  "moderation": {
    "verdict": "unsafe",
    "modalities": ["video", "audio"],
    "scores": {
      "threats": 0.5,
      "violence": 0.8661,
      "profanity": 0.5
    },
    "segments": [
      { "modality": "audio", "start": 0.1, "end": 12.74, "riskScore": 0.3, "categories": { "violence": 0.3, "threats": 0.3 } },
      { "modality": "video", "start": 54, "end": 81, "riskScore": 0.8661, "categories": { "violence": 0.8661 } },
      { "modality": "video", "start": 81, "end": 108, "riskScore": 0.5197, "categories": { "violence": 0.5197 } },
      { "modality": "audio", "start": 88.19, "end": 98.53, "riskScore": 0.5, "categories": { "profanity": 0.5 } },
      { "modality": "audio", "start": 126.82, "end": 140.19, "riskScore": 0.3, "categories": { "profanity": 0.3 } },
      { "modality": "audio", "start": 140.19, "end": 153.6, "riskScore": 0.5, "categories": { "violence": 0.5, "threats": 0.5 } },
      { "modality": "audio", "start": 153.6, "end": 169.12, "riskScore": 0.5, "categories": { "profanity": 0.5 } },
      { "modality": "video", "start": 270, "end": 297, "riskScore": 0.7656, "categories": { "violence": 0.7656 } },
      { "modality": "audio", "start": 308.64, "end": 318.88, "riskScore": 0.5, "categories": { "profanity": 0.5, "threats": 0.5 } },
      { "modality": "audio", "start": 318.88, "end": 335.14, "riskScore": 0.5, "categories": { "threats": 0.5 } },
      { "modality": "audio", "start": 404.23, "end": 422.21, "riskScore": 0.4, "categories": { "violence": 0.4, "threats": 0.4 } },
      { "modality": "audio", "start": 476.87, "end": 497.31, "riskScore": 0.5, "categories": { "profanity": 0.5 } }
    ]
  }
}
```

| Field                                                      | Description                                                                                                                                                                               |
| ---------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `moderation.verdict`                                       | Overall assessment of the media, such as `unsafe`, based on the flagged segments.                                                                                                         |
| `moderation.modalities`                                    | The tracks that produced findings: `video`, `audio`, or both.                                                                                                                             |
| `moderation.scores`                                        | The strongest confidence score per category across the whole media, from 0 to 1. Use these for a whole-media decision.                                                                    |
| `moderation.segments`                                      | The individual flagged moments, in time order. An empty array means nothing was flagged.                                                                                                  |
| `moderation.segments[].modality`                           | Whether the moment was flagged in the `video` (visual) or `audio` (spoken) track.                                                                                                         |
| `moderation.segments[].start`, `moderation.segments[].end` | Start and end of the flagged moment, in seconds.                                                                                                                                          |
| `moderation.segments[].riskScore`                          | Confidence for the segment overall, from 0 to 1.                                                                                                                                          |
| `moderation.segments[].categories`                         | The categories flagged in the segment, each with its own confidence score from 0 to 1. See [Moderation categories](/in-video-ai/detect-nsfw-content-and-profanity#moderation-categories). |

All scores are numbers from 0 to 1, where a higher value means stronger confidence that the category is present, not that the content is more severe.

Read the response at two levels:

* **Top level, for a quick decision.** `verdict` and `scores` summarize the whole media. In this example, `violence` reaches 0.8661, so the media is marked `unsafe`. The top-level `scores` reflect the strongest finding for each category across all segments.
* **Segment level, to act precisely.** Each entry in `segments` gives the exact `start` and `end` (in seconds) of a flagged moment, its `modality`, and the `categories` that triggered it. Use the timestamps to review, redact, or clip just that moment instead of the whole file.

Compare `scores` and each segment's `riskScore` against the thresholds you set, then apply your content policy. For more context, see the blog post [AI content moderation using NSFW and profanity filters](https://www.fastpix.io/blog/ai-content-moderation-using-nsfw-profanity-filter).

\


## Act on the result

Map the scores to an action that matches your content policy:

* Below your review threshold: allow the content to publish.
* In your review band: set the media to private and send it to a human review queue.
* Above your automatic-action threshold: restrict playback by updating the media `accessPolicy`, and alert your trust and safety team.

Because each segment includes its `start` and `end` time, you can target a fix at the exact moment instead of the whole video, for example beep out profanity by [replacing the audio track](/video-on-demand/replace-a-videos-audio-track) or cut a flagged moment by [removing unwanted video segments](/video-on-demand/remove-unwanted-video-segments).

To wire these decisions into an end-to-end flow, see [Gate uploads before publishing](/in-video-ai/gate-uploads-before-publishing).

\


## Limits and considerations

* Moderation runs on a ready video, so wait until the media has finished processing before you run it.
* Sampling produces the strongest results on short-form video. Evaluate accuracy on your own content before relying on it for long videos.
* Set a confidence threshold that matches your platform's tolerance, and sample your own catalog before fixing the values.
* Audio moderation, including profanity, runs on the transcript, so it is limited to the [supported audio moderation languages](/in-video-ai/detect-nsfw-content-and-profanity#supported-languages-for-audio-moderation).

\


#### Frequently asked questions

Call the FastPix In-Video AI moderation endpoint with the `mediaId` of a ready asset. Because moderation is asynchronous, wait for the `video.media.ai.moderation.ready` webhook or poll the get-results endpoint, then read the returned categories and confidence scores.

A `moderation` object with an overall `verdict`, the `modalities` analyzed, the top `scores` per category, and a `segments` array. Each segment gives its `modality`, the `start` and `end` time in seconds, a `riskScore`, and the `categories` flagged. All scores are numbers from 0 to 1, and an empty `segments` array means nothing was flagged. See the API reference for the full schema.

Start with a lower band for review and a higher band for automatic action, and use separate thresholds for video and audio. Sample your own catalog before fixing the values, since thresholds that work for short-form UGC may be too loose for kids or education platforms.

On the `video.media.ai.moderation.ready` webhook, if a category exceeds your threshold, update the media `accessPolicy` to restrict playback. Route borderline scores to a human review queue instead of blocking outright.

\


## What's next

Once moderation returns a finding, act on the flagged content:

* Beep out or replace profane audio: [Replace a video's audio track](/video-on-demand/replace-a-videos-audio-track) or [Overlay audio on a video timeline](/video-on-demand/overlay-audio-on-a-video-timeline).
* Cut a flagged moment: [Clip and trim videos](/video-on-demand/clip-and-trim-videos) or [Remove unwanted video segments](/video-on-demand/remove-unwanted-video-segments).
* Rebuild a clean version: [Merge and stitch videos](/video-on-demand/merge-and-stitch-videos).