Docs

Image Analysis

The image classification endpoint accepts JPEG, PNG, and WebP files up to 10MB. Images are resized to 224×224 and analyzed by our neural detection model.

Endpoint

curl -X POST https://api.nsfw-protect.com/classify \  -H "X-API-Key: your_api_key" \  -F "[email protected]"

Response

The classification is returned directly in the response, with a score between 0 and 1 for each label:

{  "status": "done",  "result": [    { "label": "nsfw", "score": 0.998 },    { "label": "sfw", "score": 0.002 }  ]}

Under heavy load the API may instead answer 202 with { "status": "pending" }. You are not charged for that request — retry the same upload after a short delay.