NSFW Detector API
Submit an image and get back {"verdict":"NSFW"} or {"verdict":"NOT NSFW"}.
POST/
Via URL
curl -X POST https://nsfw-detector.thrilling-tub.workers.dev/ -H 'Content-Type: application/json' -d '{"url":"https://example.com/image.jpg"}'
Via base64
curl -X POST https://nsfw-detector.thrilling-tub.workers.dev/ -H 'Content-Type: application/json' -d "$(jq -n --arg b64 "$(base64 < photo.jpg)" '{base64: $b64, mime: "image/jpeg"}')"
The mime field is optional (defaults to image/jpeg).
Response
{ "verdict": "NSFW" }
Returns 200 with the verdict, or 400/502 with {"error":"..."}.
Request fields
| Field | Type | Default | Description |
|---|---|---|---|
| url | string | — | Public image URL |
| base64 | string | — | Base64-encoded image bytes |
| mime | string | image/jpeg | MIME type of the image |
Either url or base64 is required, but not both.