NSFW Image Detection

Flag explicit, violent, or unsafe imagery. Returns a severity rating you can use to set moderation thresholds.

POST /nsfw/detect

Authentication

Bearer token in the Authorization header.

Request

Content-Type: multipart/form-data
FieldTypeRequiredDescription
fileFileRequiredImage file to analyse. Accepts PNG, JPEG, and WebP.

Response

FieldTypeDescription
scorenumberProbability the image is NSFW (0.0 – 1.0).
is_nsfwbooleanWhether the image is classified as NSFW.
severitystringSeverity level: "safe", "suggestive", "explicit", or "extreme".
verdictstringHuman-readable verdict summarising the result.

Example

Request

curl -X POST https://api.cacuda.com/nsfw/detect \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@image.png"

Response 200 OK

{
  "score": 0.03,
  "is_nsfw": false,
  "severity": "safe",
  "verdict": "safe"
}

Error Codes

CodeDescription
400No file provided or unsupported format.
401Missing or invalid API key.
402Insufficient credits.
503Detection service unavailable.

Try it in the scanner

Test this endpoint interactively with real data. No code required.

Open Scanner