Skip to main content

How it works

Frames are sampled from the video at a configurable interval, then each frame is analyzed by all enabled image-based policies (NSFW, toxicity, etc.). If any sampled frame is flagged, the video is flagged. This means any policy that works on images also works on video with zero additional configuration.
const result = await moderationApi.content.submit({
  content: {
    type: "video",
    url: "https://example.com/video.mp4",
  },
});

Supported video formats

FormatExtensions
MP4.mp4
QuickTime.mov
M4V.m4v
MPEG.mpeg

Limits

ConstraintValue
Max file size100 MB
Max duration10 minutes
Processing timeout10 minutes
Videos longer than 10 minutes are rejected with an error rather than partially analyzed. Split longer videos into segments of 10 minutes or less before submitting them.

Frame sampling

You can configure how frames are sampled per channel in the dashboard under Content > Video > Video sampling.
SettingDefaultDescription
Capture interval1 second (min 0.5)Time between sampled frames.
Maximum frames10Caps the number of frames analyzed per video. Use this to control max spend.
Spread frames evenlyOnDistributes frames across the video duration instead of from the start.

Usage and billing

Each analyzed frame costs 3 units. Total usage for a video is the number of sampled frames × 3 — for example, a video sampled at 8 frames costs 24 units. Lower the Maximum frames setting to cap usage per video.