Nosmai  Effects Nosmai  Moderation Nosmai Try-ons coming soon
Docs menu How moderation works

How moderation works

The four moderation surfaces, what each one detects, the result shapes, and how to tune thresholds.

The four surfaces

One license key unlocks four ways to moderate:

SurfaceWhat it doesMethod
ImageModerate a single photoanalyzeImage
VideoSample and aggregate a recorded clipanalyzeVideo
TextModerate a chat message or commentmoderateText
Live cameraReal-time per-frame moderationstartStream and frames

What it detects

Adult / NSFW. A whole-image verdict:

  • safe: clean.
  • warn: suggestive or borderline. Advisory only, and it does not flag the content by itself.
  • block: explicit. This makes the content unsafe.

Text. A message is classified as safe, profanity, toxic, hate, harassment or threat. Text runs in two layers: a fast keyword blocklist first, then an AI classifier for anything the blocklist misses. The result tells you which layer decided.

Results

A visual check (image or live frame) returns a result with:

FieldTypeDescription
isUnsafeboolTrue if NSFW is block
nsfwenumsafe, warn or block
nsfwScoresobjectsafe, sexy, explicit (0 to 1)

A text check returns { blocked, layer, category, score, matchedWord }.

A video check returns { isUnsafe, categories, flags, framesAnalyzed, nsfw }, where flags lists the timestamps that were flagged.

Thresholds

Both NSFW bars are adjustable at runtime. Lower is stricter. The defaults are tuned to balance catching unsafe content against false positives.

setNsfwThreshold(explicit, 0.45)   // NSFW block bar
setNsfwThreshold(sexy, 0.55)       // NSFW warn bar

[!TIP] Start with the defaults. Tighten a threshold only if you see misses, and loosen one only if you see false positives for your content.

Live performance

On the live camera, the NSFW check runs on a cadence you choose (favor responsiveness or battery). This keeps the camera preview smooth across a wide range of devices. See the platform guides for the controls.

Was this page helpful?

Your response helps us prioritize documentation improvements.

Nosmai

An AR and AI company. Founded on the idea that the next decade of software will be visual, and that the tools for it should be within reach of anyone building.

Newsletter

Product updates and release notes. No spam.

© 2026 nosmai, inc · all rights reserved