Please select all the models you are interested in. The code examples on this page will automatically update to reflect your choice.
Determine the nudity level, from explicit to mildly suggestive
Detect violent and inappropriate content
Detect recreational drugs
Detect alcohol
Detect offensive signs and gestures
Detect profanity, emails, phone numbers
Detect text that has been added during post-processing
Detect unsafe or unwanted links and profanities in QR codes
Detect smoking and tobacco products
Detect AI-generated images
Detect self-harm and self-inflicted injuries
Detect gore, horrific imagery, content with blood
Detect physical violence and threats
Detect babies, children and teenagers under 18
Detect faces and their positions
Detect and recognize celebrities
Block scammers and fraudulent users
Detect images with a low or high perceived quality
Detect blurry, dark images, get dominant colors
Determine if an image is a photo or an illustration
Detect gambling scenes, casinos, slotmachines, roulettes...
Detect displays of money, banknotes
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.
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.
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.