Nosmai Moderation
On-device moderation for images, video and text. Configurable thresholds, no cloud round-trip.
Overview
Moderation classifies user-generated content across 12+ safety categories and returns a confidence score per category. You set the threshold; content at or above it is flagged. Everything runs on-device, so nothing is uploaded.
Check content
const mod = new Nosmai.Moderation("nsk_live_...")
mod.setThreshold({ adult: 0.8, hate: 0.6 })
const r = await mod.checkText(message)
if (r.flagged) hide() // r.categories, r.score
Response shape
| Field | Type | Description |
|---|---|---|
flagged | boolean | True if any category meets its threshold |
score | number | Highest category confidence, 0 to 1 |
categories | object | Per-category scores (e.g. adult, hate) |
Configurable thresholds
Set one global threshold or per-category values. Lower is stricter. Tune them to your policy, see the live threshold playground.
TIP
Because moderation runs on-device, there is no per-call cloud bill and content never leaves the user, solving latency and compliance at once.