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.

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.