Moderation
NSFW Detection
Analyze images for NSFW content. Send a base64-encoded image or an image URL and receive a moderation result with detailed labels and confidence scores.
Request
Send a JSON body like one of these. No database is needed.
Example request (base64)
{
"image": "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg=="
}Example request (URL)
{
"image_url": "https://example.com/images/photo.jpg"
}Image ·required
Send one of these fields.
image string
Base64-encoded image
image_url string
Public URL of an image
Response
Returns an overall flag and the detected categories with confidence scores.
Example response
{
"nsfw": true,
"labels": [
{
"label": "Non-Explicit Nudity of Intimate parts and Kissing",
"confidence": "98.2%"
},
{
"label": "Non-Explicit Nudity",
"confidence": "98.2%"
},
{
"label": "Partially Exposed Buttocks",
"confidence": "98.2%"
},
{
"label": "Explicit",
"confidence": "90.1%"
},
{
"label": "Exposed Buttocks or Anus",
"confidence": "90.1%"
},
{
"label": "Explicit Nudity",
"confidence": "90.1%"
},
{
"label": "Bare Back",
"confidence": "87.6%"
}
]
}nsfw boolean
Whether the image contains NSFW content
labels array
Detected categories
Each label
label string
Name of the detected category
confidence string
Confidence percentage for the label