NSFW Content Moderation API

AI-powered content moderation for images. 99.7% accuracy, 50ms latency, 2x cheaper than AWS.

$0.0005 / image

1 credit per image GPU-powered 2x cheaper than AWS

Why PixelAPI Moderation?

Built different: Most moderation APIs charge $0.001+/image. PixelAPI charges $0.0005 — at the same price as open-source models you'd self-host, but with our GPU infrastructure, SLA guarantees, and zero ops overhead.
FeaturePixelAPIAWS RekognitionGoogle Content Safety
Price per image$0.0005$0.0010$0.0010
Image moderation
Video moderation✓ frame sampling
GPU-powered
No AWS account needed
API key auth

Use Cases

Perfect for: Dating apps, social platforms, UGC marketplaces,在线 communities, content platforms, messaging apps, digital art communities, e-commerce listings, advertising platforms.

Base URL

https://api.pixelapi.dev/v1/moderation

Authentication

All endpoints require a Bearer token. Get your key at pixelapi.dev/app:

Authorization: Bearer YOUR_API_KEY

Pricing

OperationCreditsUSDNotes
Image moderation1$0.0005Per image submitted
Video moderation1/frame$0.0005/frameSample frames, check each

Response Format

Every classification returns: label ("safe" or "nsfw"), nsfw_score (0.0–1.0), safe_score (0.0–1.0), and confidence (overall model confidence).

Endpoints

POST /classify — Moderate Images (Sync)

Submit image URLs. Processing is synchronous — results returned immediately (up to 60s wait for queued jobs).

Request:

POST /v1/moderation/classify
Authorization: Bearer YOUR_API_KEY
Content-Type: multipart/form-data

image_urls: https://example.com/image1.jpg,https://example.com/image2.png
# OR upload files directly:
images: @photo1.jpg
images: @photo2.png

Response:

{
  "moderation_id": "596200d8-a1cf-4e96-883b-4c22d0ad45d2",
  "credits_used": 2.0,
  "total_images": 2,
  "results": [
    {
      "label": "safe",
      "nsfw_score": 0.0003,
      "safe_score": 0.9997,
      "confidence": 0.9997
    },
    {
      "label": "safe",
      "nsfw_score": 0.0002,
      "safe_score": 0.9998,
      "confidence": 0.9998
    }
  ]
}

Score Reference

Score RangeInterpretation
nsfw_score < 0.1Clean — safe to display
nsfw_score 0.1 – 0.5Review — human check recommended
nsfw_score > 0.5Flag — likely NSFW, block or blur

GET /classify/{moderation_id} — Poll Result

Poll for moderation results by job ID. Useful for checking status of large batches.

Request:

GET /v1/moderation/classify/596200d8-a1cf-4e96-883b-4c22d0ad45d2
Authorization: Bearer YOUR_API_KEY

Response:

{
  "moderation_id": "596200d8-a1cf-4e96-883b-4c22d0ad45d2",
  "status": "completed",
  "credits_used": 2.0,
  "results": [
    {
      "label": "safe",
      "nsfw_score": 0.0003,
      "safe_score": 0.9997,
      "confidence": 0.9997
    }
  ],
  "completed_at": "2026-04-12 07:13:32.407041"
}

Status values: queuedcompleted or failed

Quick Examples

cURL

# Single image
curl -X POST https://api.pixelapi.dev/v1/moderation/classify \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "image_urls=https://httpbin.org/image/png"

# Multiple images (comma-separated)
curl -X POST https://api.pixelapi.dev/v1/moderation/classify \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "image_urls=https://httpbin.org/image/png,https://httpbin.org/image/jpeg"

Python

import requests

# Option 1: Image URLs (comma-separated)
response = requests.post(
    "https://api.pixelapi.dev/v1/moderation/classify",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    data={"image_urls": "https://example.com/photo1.jpg,https://example.com/photo2.jpg"},
)

# Option 2: Upload local files
response = requests.post(
    "https://api.pixelapi.dev/v1/moderation/classify",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    files=[
        ("images", open("photo1.jpg", "rb")),
        ("images", open("photo2.jpg", "rb")),
    ],
)

data = response.json()
for r in data["results"]:
    label = r["label"]
    score = r["nsfw_score"]
    if label == "nsfw" or score > 0.5:
        print(f"⚠️ Flagged: NSFW score {score}")
    else:
        print(f"✅ Clean: {score}")

JavaScript / Node.js

// Multiple URLs (comma-separated)
const formData = new FormData();
formData.append('image_urls', 'https://example.com/photo1.jpg,https://example.com/photo2.jpg');

const resp = await fetch('https://api.pixelapi.dev/v1/moderation/classify', {
  method: 'POST',
  headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
  body: formData
});
const { results } = await resp.json();
const { label, nsfw_score } = results[0];
console.log(label === 'safe' ? '✅' : '⚠️', `NSFW: ${nsfw_score}`);

Video Moderation

For videos: Sample frames every 1-5 seconds using Video API, then submit each frame to /classify. Frame sampling coming soon as a built-in endpoint.

SDKs & Libraries

PixelAPI Moderation works with any HTTP client. Official SDKs coming soon.

# Python (requests)
pip install requests
# Already works — no special SDK needed!

# JavaScript (fetch — built-in)
# Works out of the box with fetch API

# Ruby
gem install rest-client

Rate Limits

PlanConcurrent requestsDaily limit
Free1100 images
Starter310,000 images
Pro10100,000 images
Scale50Unlimited

Enterprise

Need dedicated GPU infrastructure, custom thresholds, or bulk pricing?
Talk to us →

© 2026 PixelAPI.dev — Home · Pricing · Contact