Skip to content

Image Moderation

Basic example showing how to moderate an image URL for harmful content.

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

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

// Moderate an image by URL using multiple detection models at once.
// Available models include nudity-2.1, gore-2.0, weapon, drugs,
// violence, alcohol, offensive, self-harm, scam, face-attributes,
// text-content, qr-content, genai, type, and quality.
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: "nudity-2.1,violence,offensive");