Our REST API enables you to integrate image analysis capabilities directly into your applications. Below you'll find everything you need to get started.
All API requests require an API key to be included in the header:
X-API-Key: nsfw_2f7ab4f1d743d69ee242eec932b19671
/api/v1/detect-nsfw
Content-Type: multipart/form-data
Parameter | Type | Description |
---|---|---|
image | File | Image file to analyze |
{ "result": [ { "label": "Neutral", "score": 0.64818274974823 }, { "label": "Porn", "score": 0.2696273922920227 }, { "label": "Drawing", "score": 0.050479065626859665 }, { "label": "Hentai", "score": 0.02014758251607418 }, { "label": "Sexy", "score": 0.011563214473426342 } ], "type": "normal", "code": 0 }
curl -X POST \
-H "X-API-Key: your_api_key_here" \
-F "image=@/path/to/image.jpg" \
https://nsfwdet.com/api/v1/detect-nsfw
const formData = new FormData();
formData.append('image', imageFile);
const response = await fetch('https://nsfwdet.com/api/v1/detect-nsfw', {
method: 'POST',
headers: {
'X-API-Key': 'your_api_key_here'
},
body: formData
});
const data = await response.json();
IP | Rate |
---|---|
1 IP | 20/min |
Status Code | Description |
---|---|
400 | Invalid request (e.g., missing image) |
401 | Invalid or missing API key |
429 | Rate limit exceeded |