Python

Content Moderation in Python

Production-grade moderation for any Python service.

FastAPI, Django, Flask, and any ML pipeline.

What it detects

  • User-submitted text
  • AI model outputs
  • Comment forms
  • Uploaded media
  • PII in logs
  • Custom rules

Why developers choose Vettly

  • Sync and async client
  • Works with httpx, requests, or aiohttp
  • Drop into FastAPI, Django, or Flask
  • Type stubs included
Example request
bash
import os
from vettly import Vettly

vettly = Vettly(api_key=os.environ["VETTLY_API_KEY"])

result = vettly.check(
    content=user_input,
    content_type="text",
    policy_id="default",
)

if result.action == "block":
    raise ValueError("Content blocked")
Example response
json
{
  "flagged": true,
  "action": "block",
  "categories": {
    "harassment": 0.93,
    "hate": 0.02
  },
  "policy": "default",
  "latency_ms": 142
}

Compared to rolling your own classifier

Vettly returns decisions and audit-ready logs so your Python service stays focused on product logic.

Get an API key

Start making decisions in minutes with a Developer plan and clear upgrade paths.

Get an API key