SFW API

Moderating user uploads

Last updated Mon Nov 09 2026 00:00:00 GMT+0000 (Coordinated Universal Time)

A common pattern: block level 3 outright, allow level 0, and route levels 1–2 (or any score between 35 and 65) to a review queue.

const r = await api.analyzeFile(buffer, { policy: { block_level: 3, block_sex_objects: true } });
if (r.policy?.blocked) return reject('explicit');
const grey = Object.values(r.nudity.scores).some((s) => s > 35 && s < 65);
if (r.nudity.level >= 1 || grey) return queueForReview(r);
return accept();

Nothing you send is stored by the API, so there is no second copy of user content to govern; keep your own retention rules for the originals.