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:
| Level | Name | Means |
|---|---|---|
| 0 | Everyday | Regular, fully clothed content. Always allowed. |
| 1 | Revealing | Swimwear, lingerie and outfits that show more skin. |
| 2 | Implied Nudity | Unclothed, with intimate areas covered or out of view. |
| 3 | Explicit | Visible 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
- Quickstart: first call in two minutes.
- Understanding levels and Policies.
- Analyze endpoint, Errors, Rate limits & credits.