SFW API
Menu
Nudity detection API

Nudity detection that gives you a level, not a guess.

Send an image, GIF or video. You get back a level from 0 Everyday to 3 Explicit, art and adult-object flags, and a plain blocked: true or false against your own rules. Nothing is stored.

500 free credits every month. No card.

Request
curl -X POST https://api.sfwapi.dev/v1/analyze \
  -H "Authorization: Bearer $SFWAPI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com/photo.gif", "policy": {"block_level": 2}}'
Response
{
  "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 },
  "media":  { "kind": "gif", "frames_analyzed": 5 },
  "usage":  { "credits": 5, "balance": 9995 }
}
1,300+
Discord servers protected by SfwBot
7,000,000+
images and frames checked
Same model
same policy engine as the hosted bot

Production numbers from SfwBot, as of 2026-11-09.

Four levels

Swimwear is not nudity. Your rules decide where the line is.

Every image lands on one of four levels. Send block_level with the request and we answer blocked: true or false, with the same engine that moderates Discord servers through SfwBot. Art and adult-object flags come with every answer.

  1. 0EverydayRegular, fully clothed content. Always allowed.
  2. 1RevealingSwimwear, lingerie and outfits that show more skin.
  3. 2Implied NudityUnclothed, with intimate areas covered or out of view.blocked
  4. 3ExplicitVisible intimate areas.blocked
Where do you draw the line?
{ "policy": { "block_level": 2 } }

The default most communities pick: bare skin is fine, nudity is not.

Built for coding agents

Let Claude Code, Codex or Cursor wire it up for you.

Install the skill or paste one prompt. Your agent reads our docs in Markdown, writes the integration and keeps the key on your server.

Accuracy

Strict where it counts, relaxed about everyday photos.

Measured on 5,971 images the model never saw in training. Every number comes with its method, and we publish the ones still improving too.

90.8 %
9 of 10 explicit images caught

and when the model calls an image explicit, it is right 98 times out of 100.

1.8 %
Fewer than 2 in 100 everyday photos flagged

measured on 3,908 everyday test images that never touched training.

94.9 %
19 of 20 images land on the exact level

across all four levels, from everyday to explicit.

See every metric and the limitations →
Pricing

Start free. Pay once, use whenever.

500 credits every month on the house. After that, prepaid packs from $10: one credit per image or analysed frame, and credits never expire.

$10
10,000 credits
$1.00 per 1,000
$40
50,000 credits
$0.80 per 1,000
$150
250,000 credits
$0.60 per 1,000
$500
1,000,000 credits
$0.50 per 1,000
Full pricing and comparison →
Where it fits

Guides with the wiring for the stacks we see most.

Need the full walkthrough for Next.js, FastAPI, discord.js or an image pipeline? Guides →Choosing between providers? How it compares →

Questions

The questions we get before the first request.

Is there a free tier?
Yes. Every account gets 500 credits a month, one credit per image, with no card. Prepaid packs start at $10 for 10,000 credits and never expire.
Does it work on GIFs and videos?
Yes. Frames are sampled evenly across the clip (5 by default for GIFs, 10 for videos, up to 32) and the level is the maximum over the frames. One credit per analysed frame. Video needs a paid account.
Is the media stored?
No. Images, GIFs and videos are analysed in memory and discarded when the response leaves. No bytes, URLs, file names or hashes are kept or logged.
Where is it hosted, and is it GDPR compliant?
Inference runs on our own servers in Germany; the operator is in Switzerland, which holds an EU adequacy decision. A Data Processing Agreement is part of the terms and a sub-processor list is published.
Is swimwear counted as nudity?
No. Swimwear and lingerie are level 1 (Revealing), implied nudity is level 2 and explicit content is level 3. You choose the level to block from, so a beach photo passes or fails by your rule, not ours.
Can I use it for a Discord or Telegram bot?
Yes. Send the attachment URL and act on the blocked verdict; the policy engine is the one the SfwBot Discord bot uses. There are guides for discord.js and python-telegram-bot.

More in the docs, the guides and on the pricing page.

Your first result in two minutes.

Media is processed in memory on our servers in Germany and discarded the moment you have your answer. No bytes, URLs or hashes are kept, and failed requests cost nothing.