Skip to content

AI-Generated Image Detection

Example showing how to detect AI-generated images.

This example assumes using Sightengine; is in scope and apiKey contains your Sightengine API key.

1
2
3
4
5
6
7
8
using var client = new SightengineClient(apiKey);

// Detect whether an image was AI-generated using the genai model.
// Works for images from Stable Diffusion, MidJourney, DALL-E,
// Adobe Firefly, Flux, and other generators.
var response = await client.CheckImageByUrlAsync(
    url: "https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/1200px-Image_created_with_a_mobile_phone.png",
    models: "genai");