This NaaS (Nudity-detection as a service) is using fine tuned machine learning algorithms to perform image analysis.
When you submit an image or URL it gets sent to our cluster where a dynamic number of workers run the trained model to distinguish images 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"
}
/upload
You can post a file using the POST variable image
CURL examplecurl -s -F "[email protected]" "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
}
/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
}
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/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 costsNo key | With key | |
---|---|---|
Uploading a new image | 1 | 1 |
Uploading an existing image | 1 | 0 |
Checking a hash | 0 | 0 |
All uploaded images are deleted automatically after analyzation
More info