For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
StatusSupportDiscussionsLog inSign Up
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
Docs HomeAPI ReferenceVideo on DemandAI FeaturesLive StreamingVideo PlayerVideo DataCloud PlayoutRecipes
  • Get started
    • Overview
  • Video intelligence
    • Detect NSFW content and profanity
    • Extract named entities from a video
    • Generate video chapters
    • Generate a video summary
  • AI Agents
    • Notes Agent
  • AI events
    • In-video AI events
LogoLogo
StatusSupportDiscussionsLog inSign Up
On this page
  • Prerequisites
  • Key terms
  • Enable moderation on new media
  • Enable moderation on existing media
  • Moderation categories
  • Confidence scores
  • Detection accuracy
  • Retrieve moderation results
  • Run moderation from the FastPix dashboard
  • General considerations
  • Frequently asked questions
  • What’s next
Video intelligence

Detect NSFW content and profanity

Learn how to use FastPix to detect NSFW and profane content in video or audio using confidence scores and the moderation API.
Was this page helpful?
Previous

Extract named entities from a video

Extract named entities such as people, organizations, and locations from video or audio with FastPix in-video AI, then use them for semantic tagging, search, and content discovery.

Next
Built with

FastPix detects NSFW content and profane language in video and audio through its in-video AI moderation pipeline, returning a list of flagged categories with per-category confidence scores. You enable moderation at upload time or on existing media, then read results from the video.mediaAI.moderation.ready webhook or the Get Media by ID endpoint.


Prerequisites

  • A FastPix account with an active workspace (Activate your account)
  • Your Access Token ID and Secret Key from the FastPix dashboard → API Settings
  • A video or audio source: A HTTPS URL (pull) or a direct device upload (push)
  • A webhook endpoint if you want to receive video.mediaAI.moderation.ready events

Key terms

  • MediaId: FastPix assigns a unique mediaId to every uploaded asset. You use it to enable moderation on existing media at /on-demand/<mediaId>/moderation.
  • Moderation type: Set type to video, audio, or av (both). This controls which category set applies.
  • Confidence score: A value from 0 to 1 per category. FastPix returns one score per detected category in the moderationResult array.
  • Webhook: FastPix emits video.mediaAI.moderation.ready when moderation analysis completes.

Enable moderation on new media

To run moderation on an upload, call Create Media from URL or Upload Media from Device and include a moderation object in the request. For the full event schema, see video.media.ai.moderation.ready.

Required fields in the JSON body:

  • type: video, audio, or av (both audio and video)
  • url: the HTTPS URL of the media to analyze (pull uploads only)

Request body for creating new media from URL

Request body
1{
2 "inputs": [
3 {
4 "type": "video",
5 "url": "https://static.fastpix.com/fp-sample-video.mp4"
6 }
7 ],
8 "accessPolicy": "public",
9 "moderation": {
10 "type": "av"
11 }
12}

Request body for creating new media by direct upload

For a direct device upload, the inputs section contains the upload settings:


Request body
1{
2 "corsOrigin": "*",
3 "pushMediaSettings": {
4 "moderation": {
5 "type": "av"
6 },
7 "accessPolicy": "public"
8 }
9}

Enable moderation on existing media

To analyze media already uploaded to FastPix, call the Enable video moderation endpoint:

  1. Retrieve the mediaId of the asset you want to analyze.
  2. Send a PATCH request to /on-demand/<mediaId>/moderation, replacing <mediaId> with the asset ID.

Example request body:

1{
2 "type": "av"
3}

Input parameters:

  • type: specifies whether the media is video, audio, or av (both).

Moderation categories

The filter applies different category sets depending on media type.

Audio files are evaluated against:

  • Harassment
  • Harassment/Threatening
  • Hate
  • Hate/Threatening
  • Illicit
  • Illicit/Violent
  • Sexual/Minors
  • Self-Harm
  • Self-Harm/Intent
  • Self-Harm/Instructions
  • Sexual Content
  • Violence
  • Violence/Graphic

Video files are evaluated against:

  • Self-Harm
  • Self-Harm/Intent
  • Self-Harm/Instructions
  • Sexual Content
  • Violence
  • Violence/Graphic

Confidence scores

FastPix assigns a confidence score from 0 to 1 to every detected category:

  • A score close to 1 indicates strong confidence that the content falls under the category.
  • A score close to 0 indicates low confidence.

Set a threshold that matches your tolerance. UGC platforms often block or queue for review at 0.8 and above, surface warnings at 0.5 to 0.8, and ignore anything below 0.5. Tune these values against your own content sample before rolling out in production.


Example of NSFW detection



A sample video run through the NSFW filter produced these category scores:

  • Violence: 0.94
  • Graphic Violence: 0.85
  • Self-Harm: 0.49

Scores range from 0 to 1, where higher values indicate stronger confidence that the content belongs to the detected category.

For more context, see the blog post: AI content moderation using NSFW and profanity filters.


Detection accuracy

Evaluate whether your use case actually requires moderation on long videos. Most platforms for user-generated content (UGC) prioritize short-form video, where the current sampling model produces the strongest results. TikTok and Instagram Reels, for example, both operate well within the 3-minute threshold.


Video duration across common UGC platforms:

PlatformMinimum durationMaximum durationAverage duration (small accounts)Average duration (large accounts)
TikTok3 seconds10 minutes40 seconds55 seconds
Instagram Reels15 seconds3 minutes45 seconds60 seconds

The average video on both platforms sits well below the 3-minute threshold, which matches the shape of most UGC workloads that use NSFW detection. Focusing moderation on short-form video gives you higher accuracy with lower processing cost.


Retrieve moderation results

To read moderation output for an asset, call the Get Media by ID endpoint.

Alternatively, subscribe to the video.mediaAI.moderation.ready webhook — FastPix emits this event with the full moderation payload, including categories and confidence scores, as soon as analysis completes.


Example event payload:

Response
1{
2 "type": "video.mediaAI.moderation.ready",
3 "object": {
4 "type": "mediaAI",
5 "id": "69f82b00-151c-45d4-942c-6eab719143b2"
6 },
7 "id": "449ffaa5-ba84-452a-b368-53da62d4641e",
8 "workspace": {
9 "id": "fd717af6-a383-4739-8d8c-b49aa732a8c0"
10 },
11 "moderationResult": [
12 {
13 "category": "Harassment",
14 "score": 0.87
15 },
16 {
17 "category": "Hate",
18 "score": 0.57
19 }
20 ]
21}

The moderationResult field holds an array of detected categories with per-category confidence scores.


Run moderation from the FastPix dashboard

To run NSFW and profanity 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 InVideo AI tab
    On the Media Details page, click the NSFW & Profanity detection tab to view moderation controls and history.

  3. Enable NSFW & profanity checks
    Click Generate under NSFW & Profanity Detection.

  4. View results and events
    When moderation completes, results appear in the InVideo AI tab (categories, confidence scores). FastPix emits the video.mediaAI.moderation.ready event in the Events tab.

Using Google Drive link to upload
Using Google Drive link to upload
  1. Take action: To block playback automatically, update the media accessPolicy or playback rules when the event indicates a high-confidence detection. For manual review, forward the event payload to your review queue or ticketing system.

General considerations

  • Set the correct media type: Always specify video, audio, or av. Different categories apply to each type.
  • Use the right mediaId: When calling /on-demand/<mediaId>/moderation, confirm the mediaId matches the asset you intend to analyze.
  • Optional parameters: accessPolicy and maxResolution are optional but help you control access and analysis resolution.

Frequently asked questions

How does FastPix detect inappropriate content in video?

FastPix runs multimodal indexing over sampled video frames and audio, then classifies each sample against NSFW and profanity categories. The API returns an array of matched categories with a confidence score between 0 and 1 for each.

What is the NSFW filter and what does it flag?

The NSFW filter is the component of FastPix in-video AI that labels unsafe content. It flags categories such as Sexual Content, Violence, Violence/Graphic, Self-Harm, and for audio - Harassment, Hate, Illicit, and Sexual/Minors.

How do I choose a confidence threshold?

Start at 0.8 for automatic blocking, 0.5 to 0.8 for manual review, and ignore below 0.5. Sample your own catalog before fixing these values, thresholds that work for short-form UGC may be too loose for kids or education platforms.

Which languages does profanity detection cover?

Profanity detection runs over the audio transcript produced by speech-to-text. Coverage matches the languages supported by FastPix speech-to-text, start with English for the most reliable results in Beta, and test other languages against your content before relying on them.

How do I get moderation results over webhooks?

Subscribe your webhook endpoint to video.mediaAI.moderation.ready. FastPix posts the event with the moderationResult array once analysis completes, use it to update accessPolicy, queue for review, or trigger downstream workflows.

What’s next

  • API reference: Create media from URL
  • API reference: Enable video moderation
  • API reference: Get media by ID
  • AI event reference: video.media.ai.moderation.ready
  • Add timeline hovers using spritesheets