Get started with Image Moderation

Image Moderation · Video Moderation · Image Transforms

Please select all the models you are interested in. The code examples on this page will automatically update to reflect your choice.

Nudity detection

Determine the nudity level, from explicit to mildly suggestive

Weapons

Detect violent and inappropriate content

Drugs

Detect recreational drugs

Alcohol

Detect alcohol

Hate & Offensive

Detect offensive signs and gestures

Text Moderation in Images

Detect profanity, emails, phone numbers

Embedded Text and Watermarks

Detect text that has been added during post-processing

QR code moderation

Detect unsafe or unwanted links and profanities in QR codes

Tobacco products

Detect smoking and tobacco products

AI-Generated images

Detect AI-generated images

Self-harm

Detect self-harm and self-inflicted injuries

Gore & Blood

Detect gore, horrific imagery, content with blood

Violence

Detect physical violence and threats

Minors

Detect babies, children and teenagers under 18

Face Detection

Detect faces and their positions

Celebrities

Detect and recognize celebrities

Scammers

Block scammers and fraudulent users

Image Quality

Detect images with a low or high perceived quality

Image properties & colors

Detect blurry, dark images, get dominant colors

Image type

Determine if an image is a photo or an illustration

Gambling

Detect gambling scenes, casinos, slotmachines, roulettes...

Money

Detect displays of money, banknotes

Moderate by submitting an Image URL


curl -X GET -G 'https://api.sightengine.com/1.0/check.json' \
    -d 'models={models}' \
    -d 'api_user={api_user}&api_secret={api_secret}' \
    --data-urlencode 'url=https://sightengine.com/assets/img/examples/example7.jpg'


# this example uses requests
import requests
import json

params = {
  'url': 'https://sightengine.com/assets/img/examples/example7.jpg',
  'models': '{models}',
  'api_user': '{api_user}',
  'api_secret': '{api_secret}'
}
r = requests.get('https://api.sightengine.com/1.0/check.json', params=params)

output = json.loads(r.text)


$params = array(
  'url' =>  'https://sightengine.com/assets/img/examples/example7.jpg',
  'models' => '{models}',
  'api_user' => '{api_user}',
  'api_secret' => '{api_secret}',
);

// this example uses cURL
$ch = curl_init('https://api.sightengine.com/1.0/check.json?'.http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);

$output = json_decode($response, true);


// this example uses axios
const axios = require('axios');

axios.get('https://api.sightengine.com/1.0/check.json', {
  params: {
    'url': 'https://sightengine.com/assets/img/examples/example7.jpg',
    'models': '{models}',
    'api_user': '{api_user}',
    'api_secret': '{api_secret}',
  }
})
.then(function (response) {
  // on success: handle response
  console.log(response.data);
})
.catch(function (error) {
  // handle error
  if (error.response) console.log(error.response.data);
  else console.log(error.message);
});

Remember that when you submit an image URL, the image must be publicly accessible so that Sightengine's servers can download and analyze it. If this is not the case, consider using the direct upload method.

Moderate through direct upload


curl -X POST 'https://api.sightengine.com/1.0/check.json' \
    -F 'media=@/full/path/to/image.jpg' \
    -F 'models={models}' \
    -F 'api_user={api_user}' \
    -F 'api_secret={api_secret}'


# this example uses requests
import requests
import json

params = {
  'models': '{models}',
  'api_user': '{api_user}',
  'api_secret': '{api_secret}'
}
files = {'media': open('/full/path/to/image.jpg', 'rb')}
r = requests.post('https://api.sightengine.com/1.0/check.json', files=files, data=params)

output = json.loads(r.text)


$params = array(
  'media' => new CurlFile('/full/path/to/image.jpg'),
  'models' => '{models}',
  'api_user' => '{api_user}',
  'api_secret' => '{api_secret}',
);

// this example uses cURL
$ch = curl_init('https://api.sightengine.com/1.0/check.json');
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$response = curl_exec($ch);
curl_close($ch);

$output = json_decode($response, true);


// this example uses axios and form-data
const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');

data = new FormData();
data.append('media', fs.createReadStream('/full/path/to/image.jpg'));
data.append('models', '{models}');
data.append('api_user', '{api_user}');
data.append('api_secret', '{api_secret}');

axios({
  method: 'post',
  url:'https://api.sightengine.com/1.0/check.json',
  data: data,
  headers: data.getHeaders()
})
.then(function (response) {
  // on success: handle response
  console.log(response.data);
})
.catch(function (error) {
  // handle error
  if (error.response) console.log(error.response.data);
  else console.log(error.message);
});

Do not forget to replace "/full/path/to/image.jpg" with the actual path to an image you want to run the test on.

Get your own API keys now!

CREATE FREE ACCOUNT

Was this helpful?

We're always looking for advice to help improve our documentation! Please let us know what's working (or what's not!) — we're constantly iterating thanks to the feedback we receive.

Send your suggestions!