About this endpoint
What it does
Uploads an image file and returns an NSFW classification result for that image, including a boolean flag, a label, a confidence score, and per-class scores.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | Image file upload in binary format. Maximum size: 20 MB. |
Response
Returns a JSON object with four top-level fields: nsfw as a boolean, label as a string, score as a number between 0 and 1, and scores as an object whose values are numbers.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| nsfw | Boolean | No | Boolean classification result. |
| label | String | No | Classification label returned by the service. |
| score | Number | No | Confidence score between 0 and 1. |
| scores | Object | No | Object containing score values keyed by class name. |