![Nudity Detection API Code Sample](https://assets.apilayer.com/apis/codes/nudity_detection/nudity-detection.png)
Nudity Detection classifier is available as an API to integrate with existing applications. The API accepts an image file as binary data or a URL and flags it as naked content respectively, in real-time.
Classifier computes a score on a 1 to 5 scale for the content passed to it. A score of 5 would mean that the content is most likely nude while a score close to 1 would imply the content is safe to be published. In most cases, value of 4 is safe to go.
Example
The classifier is intelligent enough to identify swimsuits and will identify them as "unlikely".
![Swim suits](https://assets.apilayer.com/apis/codes/nudity_detection/swimsuits.jpg)
Photo by Ryan Christodoulou on Unsplash
The API will return the following response for that photo.
{ "description": "Unlikely contains adult content", "value": 2 }
You shall decide on how much nudity is accepted on your platform. If you wish to be 100% safe, you shall choose 1 as your threshold value.