Skip to Content
SFW API

Overview

What the SFW API returns, how the four nudity levels work, and the mental model in sixty seconds.

The SFW API scores an image, GIF or video for nudity and gives you back a level from 0 to 3 instead of a single yes/no:

LevelNameMeans
0EverydayRegular, fully clothed content. Always allowed.
1RevealingSwimwear, lingerie and outfits that show more skin.
2Implied NudityUnclothed, with intimate areas covered or out of view.
3ExplicitVisible intimate areas.

Next to the level you get three scores (0–100, one per level threshold), two flags (art for drawings, anime, statues and stylised 3D; sex_object for adult toys), and, if you send a policy, a blocked verdict computed with the same engine the SfwBot Discord bot uses for thousands of servers.

{
  "nudity": { "level": 2, "scores": { "revealing": 96.2, "implied_nudity": 71.5, "explicit": 8.1 } },
  "flags":  { "art": { "score": 3.4, "detected": false }, "sex_object": { "score": 0.9, "detected": false } },
  "policy": { "blocked": true, "reason": "level", "matched_level": 2 }
}

The one rule to remember

Every score is calibrated so that 50 is the decision threshold. A level counts when its score is above 50. The level of a media item is the highest level whose score is above 50, taken over all analysed frames.

What never happens

Media is processed in memory and discarded. We do not store the bytes, the URL, a hash or the file name, and none of them appear in logs. Failed requests are never charged. See Data handling.

Where to go next

On this page