Skip to content

Quickstart

Sign up at getsieve.dev/signup and grab your API key from the dashboard.

You’ll get two keys:

  • mod_test_ — test mode, returns deterministic scores without calling AI models
  • mod_live_ — production mode, full pipeline
Terminal window
curl -X POST https://api.getsieve.dev/v1/moderate/text \
-H "Authorization: Bearer mod_live_xxxxx" \
-H "Content-Type: application/json" \
-d '{
"content": "I will find you and end you",
"context": "gaming_chat"
}'
const response = await fetch("https://api.getsieve.dev/v1/moderate/text", {
method: "POST",
headers: {
"Authorization": "Bearer mod_live_xxxxx",
"Content-Type": "application/json",
},
body: JSON.stringify({
content: "I will find you and end you",
context: "gaming_chat",
}),
});
const result = await response.json();
console.log(result.action); // "flag" or "block" or "allow"
import requests
response = requests.post(
"https://api.getsieve.dev/v1/moderate/text",
headers={"Authorization": "Bearer mod_live_xxxxx"},
json={
"content": "I will find you and end you",
"context": "gaming_chat",
},
)
result = response.json()
print(result["action"]) # "flag" or "block" or "allow"
{
"id": "mod_r_9x7mw2",
"flagged": true,
"action": "flag",
"tier_used": 1,
"latency_ms": 142,
"categories": {
"toxicity": {
"score": 0.72,
"threshold": 0.7,
"flagged": true
},
"threat": {
"score": 0.85,
"threshold": 0.6,
"flagged": true
},
"harassment": {
"score": 0.45,
"threshold": 0.6,
"flagged": false
},
"profanity": {
"score": 0.05,
"threshold": 0.8,
"flagged": false
}
},
"context": "gaming_chat",
"metadata": {
"pipeline_mode": "general",
"shadow_validated": true
}
}

Here’s what each field means:

FieldDescription
idUnique moderation result ID. Use this for appeals or audit logs.
flaggedtrue if any category score exceeds its threshold.
actionThe recommended action: allow, flag (send to human review), or block.
tier_usedWhich pipeline tier handled the request (0 = local, 1 = standard AI, 2 = advanced AI).
latency_msEnd-to-end processing time in milliseconds.
categoriesPer-category breakdown with score (0.0 - 1.0), threshold, and whether it was flagged.
contextThe content context you provided. Affects scoring behavior.

Pipeline modes control how Sieve classifies content. Set this per-request or as an account default.

Best for: Forums, comments, social apps

The default mode. Balanced scoring across all categories with standard thresholds.

{
"content": "your message here",
"context": "comment",
"mode": "general"
}

Best for: In-game chat, gaming communities, Discord bots

Higher tolerance for competitive banter (“gg ez”, “you’re trash”), stricter on real threats and hate speech. Understands gaming-specific slang.

{
"content": "gg ez get rekt noob",
"context": "gaming_chat",
"mode": "gaming"
}

Best for: Speed-critical paths, high-volume ingestion

Tier 0 only — local Rust processing, no AI calls. Sub-5ms latency, zero per-request cost. Use this when you need speed over nuance.

{
"content": "message to check",
"context": "chat",
"mode": "edge"
}

Pick your language and install the official SDK.

Terminal window
npm install @sieve/sdk
Terminal window
pip install sieve-mod
Terminal window
dotnet add package Sieve.Moderation

Then initialize the client:

import Sieve from "@sieve/sdk";
const sieve = new Sieve("mod_live_xxxxx");
const result = await sieve.moderate.text({
content: "check this message",
context: "gaming_chat",
});
if (result.action === "block") {
// reject the message
}
from sieve_mod import Sieve
sieve = Sieve("mod_live_xxxxx")
result = sieve.moderate.text(
content="check this message",
context="gaming_chat",
)
if result.action == "block":
# reject the message
pass
using Sieve.Moderation;
var client = new SieveClient("mod_live_xxxxx");
var result = await client.Moderate.TextAsync(new TextRequest
{
Content = "check this message",
Context = "gaming_chat",
});
if (result.Action == "block")
{
// reject the message
}

Understand the 3-tier pipeline and how scoring works under the hood.

Best practices for moderating real-time gaming communication.

Add your own blocklists, allowlists, and regex patterns.

Drop-in replacement for the Google Perspective API.