NSFW Detection API — AI Content Moderation for Images
Detect inappropriate, unwanted, or offensive content in images across 10 categories. Essential for social media platforms, e-commerce, advertising, and any application requiring content moderation and brand safety.
Features
10 Label Categories
Detect content across Explicit Nudity, Suggestive, Violence, Visually Disturbing, Rude Gestures, Drugs, Tobacco, Alcohol, Gambling, and Hate Symbols.
Hierarchical Labels
Results include both top-level categories and specific sub-labels for granular content filtering.
Brand Safety
Ensure your platform's content meets brand safety standards and advertising guidelines.
Regulatory Compliance
Help comply with local and global content regulations for user-generated content platforms.
Flexible Input
Upload a file via multipart or pass a public image URL — both work seamlessly.
Cloud-Based
No GPU needed on your end. Fully managed cloud infrastructure handles the processing.
API Reference
1 endpoint, simple integration. Here's everything you need.
Supported Content Types
https://nsfw-detect3.p.rapidapi.com/nsfw-detectAnalyze an image for inappropriate content. Returns moderation labels with confidence scores across 10 categories including nudity, violence, drugs, and hate symbols.
imagefilerequiredImage file (JPEG, PNG, etc.) — use with multipart/form-data
urlstringrequiredPublic URL of the image to process — use with application/x-www-form-urlencoded
Send either image (file upload) or url (form-encoded), not both.
{
"statusCode": 200,
"body": {
"ModerationLabels": [
{
"Confidence": 98.5,
"Name": "Suggestive",
"ParentName": ""
},
{
"Confidence": 92.3,
"Name": "Revealing Clothes",
"ParentName": "Suggestive"
}
]
}
}Response
Returns JSON with an array of moderation labels. Each label includes a confidence score, name, and parent category. Empty array means no inappropriate content detected.
Quick Start
Copy-paste code to get started in seconds. Replace YOUR_API_KEY with your RapidAPI key.
# File upload
curl -X POST "https://nsfw-detect3.p.rapidapi.com/nsfw-detect" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: nsfw-detect3.p.rapidapi.com" \
-F "image=@photo.jpg"
# URL input
curl -X POST "https://nsfw-detect3.p.rapidapi.com/nsfw-detect" \
-H "x-rapidapi-key: YOUR_API_KEY" \
-H "x-rapidapi-host: nsfw-detect3.p.rapidapi.com" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "url=https://example.com/photo.jpg"Pricing
Start free, scale as you grow. All plans include full API access with no credit card required for the free tier.
Basic
30 requests/mo
- Full API access
- All endpoints
- Standard support
Pro
5,000 requests/mo
- Full API access
- All endpoints
- Standard support
Ultra
10,000 requests/mo
- Full API access
- All endpoints
- Standard support
Mega
50,000 requests/mo
- Full API access
- All endpoints
- Standard support
Frequently Asked Questions
- What categories does the NSFW detection API cover?
- The NSFW detection API classifies images across 10 moderation categories: Explicit Nudity, Suggestive, Violence, Visually Disturbing, Rude Gestures, Drugs, Tobacco, Alcohol, Gambling, and Hate Symbols. Each label includes a confidence score and parent category for granular filtering.
- How do I integrate this content moderation API into my platform?
- Upload an image file via multipart/form-data or pass a public image URL. The API returns a JSON array of moderation labels with confidence scores. An empty array means the image is safe. You can set your own confidence thresholds to control how strictly content is filtered.
- Is this image moderation API suitable for real-time content filtering?
- Yes. The NSFW detection API is optimized for low-latency cloud processing and returns results in seconds. It is production-ready for social media platforms, e-commerce sites, and any application that needs automated image moderation at scale.
Tutorials & Guides
Learn how to integrate this API with step-by-step tutorials and real-world use cases.

Clarifai NSFW API Alternative: Migrate in Python
The Clarifai API host no longer resolves. Map its nsfw-recognition and moderation concepts to a live NSFW API with tested Python code and real results.

Best Discord NSFW Bots to Block Explicit Images (2026)
Compare 4 Discord NSFW filter bots that detect and delete explicit images, GIFs and videos, plus how to build your own with an API and Python.

NSFW Filter for AI-Generated Images: Check Before You Show
Add an NSFW filter to AI-generated images: moderate every output before display, apply a per-category policy, retry blocked seeds and log decisions in Python.

NSFW Video and GIF Moderation with Python and an API
Moderate video and GIF uploads for NSFW content in Python: sample frames with ffmpeg, score them with an API, aggregate per category, stop early to save calls.

Marketplace Content Moderation: Automate Product Listings
Automate product listing moderation on an e-commerce marketplace: screen seller images with a content moderation API, then approve, review or reject in Python.

Content Moderation API: Screen Uploads Across Risk Categories
Screen user-uploaded images for nudity, violence, drugs, and more with a content moderation API. Build a per-category policy engine and an allow/review/block flow in Python.

NudeNet v3 in Python: Tested vs an NSFW Detection API
NudeNet v3 in Python: install it, run NudeDetector, censor and batch images, then compare it with a cloud NSFW detection API on the same photos.

Best NSFW Image Detection APIs 2026: Free + Paid Compared
Compare the best NSFW image detection and moderation APIs in 2026: free tier options, categories, confidence scores, and Python code, side by side.

How to Blur NSFW Content in Images with Python
Step-by-step Python tutorial to detect and blur NSFW regions in images using an AI moderation API and Pillow. Complete working code included.

Build a Discord NSFW Moderation Bot with Python
Python tutorial to build a Discord bot that detects and removes NSFW images automatically. Complete code using discord.py and an AI content moderation API.

Automate Content Moderation with NSFW Detection
Learn how to use an NSFW detection API to automate content moderation at scale. Includes cURL, Python, and JavaScript examples plus real-world use cases.
Start Using NSFW Detect Today
Sign up on RapidAPI to get your API key. The free tier includes generous monthly requests — no credit card required.