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-nsfwContent-Type: multipart/form-data
| Parameter | Type | Description |
|---|---|---|
| image | File | Image file to analyze |
{
"result": {
"normal": 0.9602406024932861,
"nsfw": 0.04034169018268585
},
"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-nsfwconst 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 |