Drop images below to test the detection — no key required
No images yet
No images yet
No images yet
This NaaS (Nudity-detection as a service) is using fine tuned machine learning algorithms to perform image and video analysis.
When you submit an image, video, or URL it gets sent to our cluster where a dynamic number of workers run the trained model to distinguish content between Pornographic, Not safe for work (NSFW) and Neutral
If you have an API key you can send it with every request either as HTTP header with the name "NSFWKEY". If no key is supplied, free quota will be used.
Base URLhttps://nsfw-categorize.it/api
Answer structure
{
"status": "OK/ERR/NOQUOTA",
"data": {
/* the data of the successful request */
"confidence": 98.74,
"hash": "c634eaef41791d[..]2edda7aec4598b",
"classification":"nsfw",
"nsfw": true,
"porn": false
},
"quota": 4520 /* The remaining quota on your key or free calls */
}
{
"status": "ERR",
"reason": "File not a valid image"
}
When you have used up all remaining quota you get status: NOQUOTA
{
"status": "NOQUOTA",
"reason": "The quota of your API key has depleted. Visit https://nsfw-categorize.it/ to re-fill your key"
}
/api/upload
You can post a file using the POST variable image. Both image and video files are accepted. Videos are analyzed by extracting multiple frames which are each scanned individually.
CURL example (image)curl -s -F "image=@myphoto.jpg" "https://nsfw-categorize.it/api/upload"
CURL example (video)
curl -s -F "image=@myvideo.mp4" "https://nsfw-categorize.it/api/upload"
Output
{
"status": "OK",
"data": {
"confidence": 98.74,
"hash": "c634eaef41791d[..]2edda7aec4598b",
"classification":"nsfw",
"nsfw": true,
"porn": false
},
"key_quota": 4997
}
/api/upload?url=url of image
You can specify a URL in the POST or GET variable url that the call will try to download and process.
CURL examplecurl -s "https://nsfw-categorize.it/api/upload?url=https://i.imgur.com/qgDhTlX.jpg
Output
{
"status": "OK",
"data": {
"confidence": 98.74,
"hash": "c634eaef41791d[..]2edda7aec4598b",
"classification":"nsfw",
"nsfw": true,
"porn": false
},
"key_quota": 4996
}
By default the API uses a multi-model pipeline for highest accuracy. If you need faster results and can accept slightly lower accuracy, you can enable fast mode which skips the secondary models and only runs NudeNet.
/api/upload?fast=1
CURL example
curl -s -F "image=@myphoto.jpg" "https://nsfw-categorize.it/api/upload?fast=1"
X-Fast: 1
CURL example
curl -s -H "X-Fast: 1" -F "image=@myphoto.jpg" "https://nsfw-categorize.it/api/upload"
If you want to check if a file you have on hand was already checked by our API, you can use this call.
API call/api/hash/sha1 hash of file
CURL example
curl -s "https://nsfw-categorize.it/api/hash/c634ead[..]7aec4598b"
Output
{
"status": "OK",
"data": {
"confidence": 98.74,
"hash": "c634ead[..]7aec4598b",
"classification":"nsfw",
"nsfw": true,
"porn": false
},
"key_quota": 4996
}
If no valid key is sent to the API, the free quota of 10 calls per IP and day will be used. The daily free quota will reset 24 hours after the last API call (with a quota cost of 1) was received.
Quota costs| No key | With key | |
|---|---|---|
| Uploading a new image | 1 | 1 |
| Uploading a known image | 1 | 0 |
| Checking a hash | 0 | 0 |
All uploaded images are deleted automatically after analyzation
More info