Election-safety moderation API for detecting incitement, hate speech & election harms in Kenya’s multilingual, code-switched contexts.
# Sentinel
Open-source election-safety moderation API built to help protect Kenya's 2027 general election from ethnic incitement and election disinformation.
Sentinel currently supports code-switched moderation across English (`en`), Swahili (`sw`), and Sheng (`sh`) in the live moderation hot path. Language-pack artifacts for additional languages (including Luo and Kalenjin) are included for operator evaluation and staged rollout, but are not active in default hot-path enforcement.
Sentinel returns deterministic moderation decisions (`ALLOW`, `REVIEW`, or `BLOCK`) with full audit evidence, so every action can be explained and appealed.
## Who is this for?
**Platform integrators** — You run a forum, news platform, or civic tech tool and need a moderation API. You send text, Sentinel returns a decision. Start with the Integration Guide.
**Self-host operators** — You want to deploy and manage a Sentinel instance for your organization. Start with the Deployment Guide.
Both audiences should begin with the Quickstart.
## Capability Snapshot
- **Available now (default runtime)**: moderation routing and enforcement for `en`, `sw`, `sh`
- **Included but not default-active**: additional language-pack artifacts (e.g., Luo, Kalenjin)
- **Contract stability**: `POST /v1/moderate` is the stable integration surface; operator endpoints (`/admin/*`, `/internal/*`) can evolve
## What Sentinel returns
```jsonc
{
"toxicity": 0.92,
"labels": ["INCITEMENT_VIOLENCE"],
"action": "BLOCK",
"reason_codes": ["R_INCITE_CALL_TO_HARM"],
"evidence": [
{
"type": "lexicon",
"match": "kill",
"severity": 3,
"lang": "en"
}
],
"language_spans": [
{"start": 0, "end": 26, "lang": "en"}
],
"model_version": "sentinel-multi-v2",
"lexicon_version": "hatelex-v2.1",
"pack_versions": {"en": "pack-en-0.1", "sw": "pack-sw-0.1", "sh": "pack-sh-0.1"},
"policy_version": "policy-2026.11",
"latency_ms": 12
}
```
Every response includes the evidence that drove the decision, the versions of all artifacts invo …