Docs / AI Content Detection / AI-Generated Image Detection

AI-Generated Image Detection

genai

Detect if an image was generated by an AI model such as Nano Banana, Seedream, Stable Diffusion, GPT, MidJourney, Flux, Firefly and more.

This page describes AI image detection. AI video detection is also available.

Overview

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: Nano Banana, GPT-image, Stable Diffusion, MidJourney, Firefly, Flux, Reve, Recraft, Imagen, Ideogram, GANs... 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 and fake news
  • Implement stricter moderation rules on AI-generated imagery
  • Detect potential fraud with fake ids, fake profiles or fake claims
  • Limit ai-generated spam
  • Enact bans on AI-generated imagery

Related model

The following 3 models can provide a useful complement to the AI-generated image detection model:

Examples

AI-generated images

Image by Stable Diffusion

Stable Diffusion

AI Image Generated by MidJourney

MidJourney

Image by Firefly

Firefly

Image by DALL-E

DALL-E 3

Image fully generated using Ideogram

Ideogram

Text-to-image example from Flux

Flux

Image by Kling

Kling

Image by Seedream

SeeDream

Image by GPT

GPT

Image by Nano Banana

Nano Banana Pro

Image by StyleGan

StyleGan2 (thispersondoesnotexist)

Generator-specific information

Sightengine's AI detection models compute per-generator confidence scores alongside a global AI probability score. For every image or video analyzed, the API response includes individual scores for each supported generator, giving you a complete fingerprint of the content.

The list of supported generators spans both images and videos, covering major commercial tools, open-source models, and older GAN-based architectures:

GeneratorCreatorExample versions detected
DALL-EOpenAIDALL-E 2, DALL-E 3, ...
FireflyAdobeFirefly 2, Firefly 3, ...
FluxBlack Forest LabsFlux.1 Dev, Flux.1 Schnell, Flux Pro, ...
GPT image generationOpenAIGPT-4o, GPT-1.5 image...
Grok ImaginexAIImagine, Imagine Pro...
HiggsfieldHiggsfield AIHiggsfield Soul...
IdeogramIdeogramIdeogram 2.0, Ideogram 3.0, ...
ImagenGoogleImagen 2, Imagen 3, ...
KlingKuaishouKling 2.0, Kling 3.0, ...
MidjourneyMidjourneyMidjourney v5, v6, v7, ...
Nano BananaGoogleNano Banana 2, Nano Banana Pro, ...
QwenAlibabaQwen2-VL, ...
RecraftRecraftRecraft V3, ...
ReveReveReve Image 1.0, ...
SeedreamByteDanceSeedream 2.0, Seedream 3.0, ...
Stable DiffusionStability AISD 1.5, SD 2.1, SDXL, SD3, ...
StyleGANNVIDIAStyleGAN2, StyleGAN3, ...
Z-imageAlibabaZ-image, Z-image Turbo, ...
Other generatorsVariousGenerators with a smaller audience

And more, new generators are added continuously as they appear in the wild.

Code examples

Upload a file or send an image URL, pick your language, and receive a JSON response. Need credentials first? Create a free account →

POST api.sightengine.com/1.0/check.json
Response: JSON

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


# this example uses requests
import requests
import json

params = {
  'models': 'genai',
  'api_user': '{api_user}',
  'api_secret': '{api_secret}'
}
files = {'media': open('/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('/path/to/image.jpg'),
  'models' => 'genai',
  '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('/path/to/image.jpg'));
data.append('models', 'genai');
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);
});

Required: media, models, api_user, api_secret. See full parameter reference →
ParameterTypeDescription
mediafileimage to analyze
modelsstringcomma-separated list of models to apply
api_userstringyour API user id
api_secretstringyour API secret

API response

The API returns a JSON response with the following structure:

        
        
{
  "status": "success",
  "request": {
    "id": "req_0zrbHDeitGYY7wEGncAne",
    "timestamp": 1491402308.4762,
    "operations": 5
  },
  "type": {
    "ai_generated": 0.01
  },
  "media": {
    "id": "med_0zrbk8nlp4vwI5WxIqQ4u",
    "uri": "https://sightengine.com/assets/img/examples/example-prop-c2.jpg"
  }
}


      

See response description

Successful Response
Status code: 200, Content-Type: application/json
FieldTypeDescription
statusstringstatus of the request, either "success" or "failure"
requestobjectinformation about the processed request
request.idstringunique identifier of the request
request.timestampfloattimestamp of the request in Unix time
request.operationsintegernumber of operations consumed by the request
typeobjectresults for the model
mediaobjectinformation about the media analyzed
media.idstringunique identifier of the media
media.uristringURI of the media analyzed: either the URL or the filename
Error
Status codes: 4xx and 5xx. See how error responses are structured.

FAQ

Which AI image generators are supported?

We aim to support all current generators, including Flux, GPT-image, Nano Banana (and Nano Banana Pro), Imagen, Midjourney, Stable Diffusion (1.x, 2.x, SDXL, SD3), Firefly, Qwen, Ideogram, Recraft, Reve, SeeDream, Kling, Wan along with other smaller generators, as well as GAN-based generators such as StyleGAN2/3. The model is updated on an ongoing basis as new generators become available. See Supported AI generators.

How does detection work without metadata or a watermark?

Detection is purely pixel-based. Metadata, EXIF tags, C2PA provenance, and invisible watermarks are ignored, so stripping them has no effect on the result.

What does the ai_generated score mean?

It is the model's confidence, from 0 to 1, that the image was produced or edited by a generative AI model. Higher means more likely AI-generated.

Does it work on screenshots of AI images, or compressed and re-shared images?

Yes. Detection is robust to re-encoding, compression, resizing and other transforms. Confidence may drop somewhat on heavily degraded images or screenshots with significant UI chrome, but the model is specifically developed to work on real-world redistribution artifacts.

Can it tell which generator produced the image?

Yes, the genai model can return per-generator scores along with the general ai_generated score. For access to finer-grained analysis, contact us.

What about AI-edited real photos (inpainting, face swaps, retouching)?

The genai model targets images that are fully AI-generated as well as images that are AI edited. For face swaps and manipulated faces, use Deepfake Detection.

Is this available for video?

Yes. A separate model is available specifically for AI video detection. This model targets current AI video generators. See AI Video Detection.

What are the limits and pricing?

A free tier is available for testing and personal use. Production use is available through paid tiers that scale with volume. Enterprise setups are also possible, with enterprise-exclusive features. See Pricing.

How often is the model updated?

New generators are evaluated and incorporated on an ongoing cadence. See the Changelog.

Can I call this model together with other Sightengine models?

Yes. Pass a comma-separated list in the models parameter: models=genai,deepfake,nudity-2.1 and the API will return all results in a single response. This is the recommended pattern for production pipelines.

Next steps