Welcome to Nudity detection service

Version 35660

About this service

The service returns the nudity probability in the uploaded image from 0 to 1. It can be used to filter inappropriate content.

Supported image formats are:

  • JPEG (.jpg, .jpeg)
  • PNG (.png)

API

POST /api/v1/detection

Compute nudity probability

Compute the nudity probability in the uploaded image from 0 to 1.

HTTP Request

POST https://api.example.com/api/v1/conversions

Headers

Content-Type: multipart/form-data

Body

Parameter Type Presence Description
file File Required Image

Examples:

curl -F file=@/some/image/on/your/local/disk http://nudity.service/api/v1/detection
<?php

use GuzzleHttp\Client;

$client = new Client([
    'base_uri' => 'http://nudity.service.srw.cz',
    'timeout' => 5.0,
]);

$response = $client->request('POST', '/api/v1/detection', [
    'multipart' => [
        [
            'name' => 'file',
            'contents' => fopen('/some/image/on/your/local/disk', 'r')
        ],
    ]
]);

$body = $response->getBody();
$json = json_decode((string) $body->getContents());

Response

Success 200

Headers

Content-Type: application/json

Body

Probability value.

Example:

{"score": 0.0042}

Error 400

Headers

Content-Type: application/json

Body

Parameter Description
error Error description.

Example:

{"error": "File is not a valid image."}

Try it

Upload image and show the result.

On the image is nudity with probability %

Error: