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.

Best NSFW Detection APIs Compared: 2026 Guide
Compare the top NSFW detection and image moderation APIs on accuracy, pricing, and ease of use. Python examples and side-by-side feature breakdown.

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.