Models / AI-Generated Image Detection

AI-Generated Image Detection BETA

Table of contents


The AI-Generated Image Detection Model can help you determine if an image was entirely generated by an AI model, or if it is a real image. This model was trained on millions of artificially-created and human-created images spanning all sorts of content such as photography, art, drawings, memes and more.

The Model works by analyzing the visual (pixel) content of the image. No meta-data is used in the analysis. Tampering with meta-data such as EXIF data therefore has no effect on the scoring.

The Model was trained to detect images generated by the main models currently in use: Stable Diffusion, Stable Diffusion XL, MidJourney, Dall-E... Additional models will be added over time as they become available.

Use cases

  • Tag AI-generated imagery as such, to limit the spread of misinformation
  • Implement stricter moderation rules on AI-generated imagery
  • Enact bans on AI-generated imagery


AI-generated images

Image by DALL-E

Stable Diffusion

Image by DALL-E


Image by MidJourney

MidJourney 5.2

Image by Firefly


Use the model

If you haven't already, create an account to get your own API keys.

Detect if an image was AI-generated

Let's say you want to check the following image:

You can either upload a public URL to the image, or upload the raw binary image. Here's how to proceed if you choose to share the image's public URL:

curl -X GET -G '' \
    -d 'models=genai' \
    -d 'api_user={api_user}&api_secret={api_secret}' \
    --data-urlencode 'url='

# this example uses requests
import requests
import json

params = {
  'url': '',
  'models': 'genai',
  'api_user': '{api_user}',
  'api_secret': '{api_secret}'
r = requests.get('', params=params)

output = json.loads(r.text)

$params = array(
  'url' =>  '',
  'models' => 'genai',
  'api_user' => '{api_user}',
  'api_secret' => '{api_secret}',

// this example uses cURL
$ch = curl_init(''.http_build_query($params));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);

$output = json_decode($response, true);

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

axios.get('', {
  params: {
    'url': '',
    'models': 'genai',
    'api_user': '{api_user}',
    'api_secret': '{api_secret}',
.then(function (response) {
  // on success: handle response
.catch(function (error) {
  // handle error
  if (error.response) console.log(;
  else console.log(error.message);

The API will then return a JSON response:

    "status": "success",
    "request": {
        "id": "req_0zrbHDeitGYY7wEGncAne",
        "timestamp": 1491402308.4762,
        "operations": 1
    "type": {
      "ai_generated": 0.01
    "media": {
        "id": "med_0zrbk8nlp4vwI5WxIqQ4u",
        "uri": ""

Any other needs?

See our full list of Image/Video models for details on other filters and checks you can run on your images and videos. You might also want to check our Text models to moderate text-based content: messages, reviews, comments, usernames...

Was this page helpful?