NewAPIVerve Academy: free courses and certifications anyone can verify.Explore the Academy →

NSFW Image Detector API

POST

Catch adult images before other users see them.

NSFW Image Detector is an NSFW detection API that checks whether an image contains explicit adult content. Upload a JPG, PNG or GIF up to 5 MB, or pass an image URL, to get isNSFW and isSafe flags.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/nsfwimagedetector
image
Click or drag a file to upload.jpg, .jpeg, .png, .gif · max 400KB for live testing
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "isNSFW": false,
    "isSafe": true,
    "confidence": 0.987,
    "category": "neutral"
  }
}

About the NSFW Image Detector API

An NSFW image detection API for user uploads: check avatars, listings and chat attachments before other users see them. The image is scaled to 512 pixels on its longest side and run through a vision transformer classifier with two labels, sfw and nsfw, which APIVerve hosts itself, so images are not passed to a third-party moderation service. An image is flagged when its nsfw score reaches 0.6. Every plan gets isNSFW and isSafe; paid plans add that score as confidence, from 0 to 1, so you can apply a stricter or looser threshold, and the verdict label. It answers one question, explicit or not; there are no separate labels for violence, gore or weapons.

What people use it for

Avatar Upload Filtering
Dating platforms inspect incoming profile pictures and immediately reject submissions flagged as adult content before they display publicly.
Marketplace Listing Screening
When sellers publish new product photos, e-commerce sites check each image to prevent explicit inventory from appearing in public catalog searches.
Community Chat Moderation
To keep discussion rooms family-friendly, messaging services block shared GIF and image attachments whenever the safe content check fails.
Support Ticket Attachment Triage
Route incoming helpdesk image files through screening checks so support representatives avoid unexpected exposure to explicit material while troubleshooting.

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Questions.

Common questions about the NSFW Image Detector API.

Read the docs →
Which image file formats and sizes does the detector accept?
You can upload JPG, JPEG, PNG and GIF files of 5 MB or smaller, or send a link to an image instead of the file.
Can I pass an image URL instead of uploading the file directly?
Yes. Put a public image URL in the image field, or in url, instead of a file. The image is downloaded and checked the same way; the link must point straight at the image file, not at a page that shows it.
Are the confidence score and category breakdown included on the Free plan?
No, the confidence score and category are premium fields. The Free plan returns the isNSFW and isSafe flags. Starter and higher plans add confidence, the classifier's nsfw score from 0 to 1, and category, the verdict as a label (sfw or nsfw, matching isNSFW).
What would 5,000 image checks a month cost me?
Each check takes 10 credits, which works out to about $1.50 per 1,000 checks on Starter. Running 5,000 checks uses 50,000 credits, fitting comfortably inside the 200,000 credits provided each month on the Starter plan. The Free plan includes 20 checks per month for testing.
What happens if an uploaded file exceeds the 5 MB limit?
Uploads larger than 5 MB are rejected with a 413 error before classification. Resize the image first; the classifier only looks at a 512-pixel version, so a smaller upload loses nothing.

Ready to build with NSFW Image Detector? Start with 200 free credits — one key unlocks all 406+ APIs.

Explore the catalog

406+ APIs on the same key and the same response shape.

Browse all APIs