v1

latestOpenAPI 3.1.0MIT2026-07-262861121.0 KB

Binary NSFW classification for image URLs or data URLs

post/nsfw/image

Request body

imageUrlstring uri

Alias for a single image URL

imageDataUrlstring

Base64 data URL for a single image (format: data:image/[type];base64,[data])

imageDataUrlsstring[]

Base64 data URLs for multiple images (only the first 10 are processed)

modelstring

Only supported value is nsfw-classifier

Example request

{
  "image_urls": "https://example.com/image.jpg",
  "imageUrls": "https://example.com/image.jpg",
  "imageUrl": "https://example.com/image.jpg",
  "imageDataUrl": "data:image/jpeg;base64,/9j/4AAQ..."
}

Response

NSFW classification response

modelstring

The classifier model used

requestIdstring

Request ID (if available; helpful for support)

inputCountinteger

Number of images processed (max 10)

costnumber

Final charged amount (after discounts and currency conversion)

currencystring

Currency of the charge

truncatedboolean

True if more than 10 images were provided

has_nsfw_conceptsboolean[]

Per-image NSFW flags in input order

is_nsfwboolean

True if any image was flagged

Example response

{
  "model": "nsfw-classifier",
  "inputCount": 2,
  "cost": 0.003,
  "currency": "USD",
  "has_nsfw_concepts": [
    false,
    true
  ],
  "is_nsfw": true
}