Skip to content

Text Moderation

Example showing how to moderate text content for profanity and personal information.

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 text content for profanity, personal information
// (emails, phone numbers, usernames, IP addresses, SSNs), and links.
// Supports rule-based mode and username validation mode.
var response = await client.CheckTextAsync(
    text: "Hello world, this is a clean test message.",
    lang: "en",
    mode: CheckTextRequestMode.Rules);