SFW API
Menu

Compare

SFW API vs NudeNet

Last updated 2026-11-17

NudeNet is an open-source Python library that runs on your own servers: it detects exposed and covered body parts and returns a box for each. The SFW API is a hosted endpoint that grades the whole image: a level from 0 to 3, three scores, art and adult-object flags and a policy verdict. Facts below are from NudeNet's GitHub repository and PyPI page in November 2026 (version 3.4.2).

SFW APINudeNet
Runshosted API (Germany)your servers, ONNX Runtime on CPU or GPU
Price500 free credits/month, then $10 for 10,000 ($1.00/1k), down to $0.50/1kfree software; you pay for the servers
Outputlevel 0–3, three scores, art and sex_object flags, policy verdicta list of detections: one of 18 labels, a score and a box
Whole-image decisionbuilt in, with a policy you configureyour own rules on top of the detections
Modelsone versioned model, metrics on Accuracy320n (bundled, about 12 MB) or 640m (about 104 MB), both on YOLOv8
GIF/videoframe by frame on the same endpoint (video on paid accounts)single images; GIF support is an open pull request
Drawings and objectsart flag, sex_object flagno equivalent labels
Licencecommercial APIrepository licence is AGPL-3.0 (PyPI lists MIT)
Maintenancemaintained with the APIlast code change July 2024; the README asks for new maintainers

NudeNet is enough if images must not leave your infrastructure, you are fine with AGPL obligations, and you want boxes, for example to blur exposed areas with its censor() method. Choose the SFW API if you want a decision per image without writing rules, need GIFs and videos, want drawings and adult objects told apart, or do not want to run and update a model yourself.

Mapping NudeNet labels to levels

NudeNet detectionsSFW API
FEMALE_GENITALIA_EXPOSED, MALE_GENITALIA_EXPOSED, FEMALE_BREAST_EXPOSED, ANUS_EXPOSEDlevel 3 Explicit
BUTTOCKS_EXPOSEDlevel 2 or 3 depending on what else is shown
*_COVERED labels onlylevel 0, 1 or 2: the labels fire for clothing, swimwear and covered nudity alike
BELLY_EXPOSED, ARMPITS_EXPOSED, FEET_EXPOSEDlevel 0 or 1
no equivalentart flag (drawings, anime, statues), sex_object flag (adult toys)

The hard cases for a body-part detector are the ones between the rows: an unclothed person with intimate areas out of view (level 2) has no exposed label, and a bikini and covered nudity both produce *_COVERED. The SFW API scores those directly.

The same check in both

# NudeNet
from nudenet import NudeDetector
detector = NudeDetector()
EXPLICIT = {"FEMALE_GENITALIA_EXPOSED", "MALE_GENITALIA_EXPOSED", "FEMALE_BREAST_EXPOSED", "ANUS_EXPOSED"}
blocked = any(d["class"] in EXPLICIT and d["score"] > 0.5 for d in detector.detect("photo.jpg"))

# SFW API (pip install sfwapi)
from sfwapi import SfwApi
api = SfwApi(api_key=os.environ["SFWAPI_API_KEY"])
r = api.analyze_file("photo.jpg", policy={"block_level": 2})
blocked = r["policy"]["blocked"]

Related

Next steps

Read the quickstart for a first request, see pricing for the free tier and prepaid packs, or get a free API key and start with your own images.