Available Now

Text Moderation API

Hate, bias, and toxicity detection across 11 corpora — production-deployed

Text-side of the Bhala T&S product family. Hate / bias / toxicity scoring across 11 hate corpora and 12 protected groups, with 9× cleaner counter-speech / slur-reclamation handling than keyword-based classifiers. Live in production on the Bhala Bluesky labeler.

Features

What you get

HateCheck 0.90, TweetEval-hate 0.77, AUROC 0.93–0.99 per protected group
12 protected categories (race, religion, gender, disability, sexuality, migration status, …)
Structural-twin handling — 'I hate X' (P=0.87) vs 'Saying I hate X is bigoted' (P=0.10)
Pre-calibrated thresholds at 1% / 5% / 10% FPR for review-queue / production / aggressive-recall workflows
Cryptographic receipts on every call — EU DSA Article 14 + UK Online Safety Act ready
67 calls/sec sustained on a 4-core CPU droplet — no GPU required
Same encoder powers AI image detection (one model, two modalities, one API)
Drop-in replacement for Google Perspective API (sunsetting Dec 31, 2026)
Pricing: $0.0005 per 100 chars · Free 5,000 calls/mo
Request
curl -X POST https://api.bhala.ai/v1/score \
  -H "Authorization: Bearer bh_sk_..." \
  -H "Content-Type: application/json" \
  -d '{
    "texts": ["You are amazing!", "I hate those people."]
  }'
Response
{
  "items": [
    {
      "text": "You are amazing!",
      "scores": { "any_hate": 0.04, "women": 0.02, "lgbt": 0.03 },
      "fired": [],
      "evidence_redacted": {}
    },
    {
      "text": "I hate those people.",
      "scores": { "any_hate": 0.81, "lgbt": 0.62, "migrants": 0.58 },
      "fired": ["bhala:hate-speech"],
      "evidence_redacted": { "trigger_span": "[REDACTED]" }
    }
  ],
  "latency_ms": 18,
  "model_version": "bhala-text-mod-v1"
}

Use Cases

What you can build with Text Moderation API

Content platforms — hate / harassment / counter-speech triage at scale

News / social — comment-section moderation across languages

Trust & Safety teams — review-queue prioritization with calibrated FPR

EU DSA / UK OSA compliance — signed audit trail per moderation decision

Migrating from Perspective API — sunset is Dec 31, 2026

Ready to get started?

Start building with Text Moderation API.