ban.wtf APIs Reference
Complete developer reference for integrating Image and Text moderation router endpoints into Discord bots, backend web applications, and LLM agent pipelines.
Machine-Readable & Agent Documentation
Standardized, structured endpoints ready to load into Cursor, Claude, custom LLM agents, and OpenAPI client generators.
Full machine-readable specification for Swagger, Postman, Cursor, and SDK generators.
Concise markdown index conforming to the /llms.txt standard for rapid LLM ingestion.
Complete, un-truncated API documentation and code examples in a single prompt-ready file.
Authentication
All requests to the ban.wtf API router require an active secret key prefixed with bw_live_. You can generate keys in your API Keys Manager.
Charge-and-Use Credit System
There are no monthly commitments or subscriptions. Your account balance is deducted on a strict per-request basis upon successful moderation.
Evaluates explicit adult nudity, drawn/manga nudity, and calculates estimated face age & minor flag.
Stateless high-performance Discord message moderation using hybrid AI guardrails. Detects phishing/scams, zero-day raids, toxicity, and action candidate probabilities.
Credits can be purchased at any time in the Billing Section through verified SumUp payments.
Image Moderation API
Discern explicit nudity, anime/drawn nudity, and estimate a person's age using TensorFlow.js NSFWJS and Face-API models. Cost: 1 credits per image.
| Field | Type | Format | Description |
|---|---|---|---|
| image_url | string | JSON Body | Public HTTP/HTTPS URL of the image to download and classify. |
| image | binary | multipart/form-data | Direct image file upload (JPEG, PNG, WebP). |
| image_base64 | string | JSON Body | Base64-encoded image string or data URI. |
curl -X POST "https://apis.ban.wtf/api/v1/moderate/image" \
-H "Authorization: Bearer bw_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"image_url": "https://images.unsplash.com/photo-1534528741775-53994a69daeb"
}'Text Moderation API
Evaluates a single message context against configured safety policies, zero-day raid filters, phishing/scam heuristics, and AI instructions. Cost: 0.5 credits.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| content | string | Yes | — | The message text to analyze. |
| author | string | No | "user#0001" | Author username, discriminator, or Discord snowflake ID. |
| channel | string | No | "#general" | Channel name or Discord channel snowflake ID. |
| account_age_days | integer | No | 30 | Age of author's Discord account in days (for zero-day raid detection). |
| mentions_count | integer | No | 0 | Count of mentions in message (for mass-ping raid detection). |
| mode | string | No | "hybrid" | Pipeline: "hybrid" (AI + Guardrails) or "native". |
curl -X POST "https://apis.ban.wtf/api/v1/moderate/text" \
-H "Authorization: Bearer bw_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "FREE NITRO: Claim your Discord Nitro gift at https://discrod-nitro-gift.ru/claim @everyone",
"author": "spambot#1337",
"channel": "#general",
"account_age_days": 1,
"mentions_count": 1,
"mode": "hybrid"
}'Batch Moderation API
Evaluates up to 50 messages concurrently in a single HTTP request. Cost: 0.5 credits per message evaluated.
Custom Decision Inference & Judges API
Runs general-purpose decision inference on arbitrary input contexts using custom questions, instructions, or criteria. Unlike moderation-specific endpoints, callers can define any custom questions in shorthand array, typed schema, or freeform prompt. Cost: 0.5 credits.
curl -X POST "https://apis.ban.wtf/v1/inference" \
-H "Authorization: Bearer bw_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"state": {
"customer_id": "corp_9981",
"ticket_subject": "Production database latency spike in us-east-1",
"error_code": "504 Gateway Timeout"
},
"instructions": {
"department": {
"type": "choice",
"instructions": "Select engineering department responsible for resolution.",
"criteria": {
"database_sre": "PostgreSQL database latency, clustering, failover",
"billing_finance": "Invoices, credit card charges, refunds",
"sales_expansion": "New contract negotiation, upsell"
}
},
"urgency": {
"type": "score",
"instructions": "Assess business urgency.",
"criteria": ["routine", "minor", "major", "critical"]
},
"requires_pager": {
"type": "noul",
"instructions": "Requires immediate on-call pager?",
"criteria": { "true": "Critical outage", "false": "Normal queue" }
}
}
}'In addition to ad-hoc inference, you can create persistent decision makers called Judges in your dashboard. When creating a Judge, enable storeContent: true to automatically record all incoming API requests and model responses.
- Call your Judge directly via
POST /v1/judges/{judge_id}/inferenceor by passing"judge_id": "..."inPOST /v1/inference. - In the dashboard, view your dataset and re-classify model predictions to set ground-truth training data.
- Submit a Checkpoint of all data up until that point for 5,000 credits to fine-tune custom model weights.