Content SafetyFree tier available

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

multipart/form-dataapplication/x-www-form-urlencoded
POSThttps://nsfw-detect3.p.rapidapi.com/nsfw-detect

Analyze an image for inappropriate content. Returns moderation labels with confidence scores across 10 categories including nudity, violence, drugs, and hate symbols.

imagefilerequired

Image file (JPEG, PNG, etc.) — use with multipart/form-data

urlstringrequired

Public URL of the image to process — use with application/x-www-form-urlencoded

Send either image (file upload) or url (form-encoded), not both.

Response Schema
{
  "statusCode": 200,
  "body": {
    "ModerationLabels": [
      {
        "Confidence": 98.5,
        "Name": "Suggestive",
        "ParentName": ""
      },
      {
        "Confidence": 92.3,
        "Name": "Revealing Clothes",
        "ParentName": "Suggestive"
      }
    ]
  }
}

Response

200

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.

Free

Basic

$0Free

30 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Pro

$12.99/mo

5,000 requests/mo

  • Full API access
  • All endpoints
  • Standard support
Recommended

Ultra

$22.99/mo

10,000 requests/mo

  • Full API access
  • All endpoints
  • Standard support

Mega

$92.99/mo

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.

Content Moderation for Marketplace Seller Listings
Guide

Content Moderation for Marketplace Seller Listings

Screen user-uploaded listing images on an e-commerce or classifieds marketplace with a content moderation API. A category policy that allows legit apparel but blocks prohibited products, in Python.

Read article
Content Moderation API: Screen Uploads Across Risk Categories
Guide

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.

Read article
NSFW Detection: API vs NudeNet for Content Moderation
Guide

NSFW Detection: API vs NudeNet for Content Moderation

Compare a cloud NSFW detection API with NudeNet open source. Side-by-side test results, category coverage, code examples, and when to use each.

Read article
Best NSFW Image Detection APIs 2026: Free + Paid Compared
Guide

Best NSFW Image Detection APIs 2026: Free + Paid Compared

Compare the best NSFW image detection and moderation APIs in 2026. Free tier options, accuracy benchmarks, pricing, and Python code, side-by-side.

Read article
How to Blur NSFW Content in Images with Python
Tutorial

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.

Read article
Build a Discord NSFW Moderation Bot with Python
Tutorial

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.

Read article
Automate Content Moderation with NSFW Detection
Use Case

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.

Read article

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.