Skip to content
RSFlowHub
  1. Home
  2. APIs
  3. Social & Comments
  4. Automated Toxic Comment Filter & Moderation API
Social & Comments API

Automated Toxic Comment Filter & Moderation API

Automated social comment moderation API detecting toxicity, harassment, hate speech, profanity, and promotional abuse.

POST https://rsflowhub.com/api/v1/ai/comment-moderate
  • 3 credits per call
  • X-API-Key header
  • JSON in, JSON out
POST /api/v1/ai/comment-moderate
{
    "comment": "Buy cheap followers now at http://fakefollowers.com !!! FAST DELIVERY!",
    "platform": "YouTube"
}
200 OK response.json
{
    "result": {
        "is_safe": false,
        "categories": [
            "harassment",
            "spam"
        ],
        "severity": "high",
        "recommended_action": "hide",
        "reason": "Insults other users and promotes an external offer.",
        "confidence": 0.93
    }
}
Definition

What is the Automated Toxic Comment Filter & Moderation API?

Automated Toxic Comment Filter & Moderation API is a REST API on RSFlowHub for web, mobile and AI agent applications. Send a JSON request to POST /api/v1/ai/comment-moderate with your API key; RSFlowHub runs it on a tuned AI model, falls back to a backup provider if needed, and returns a structured JSON result, usually within 1 to 3 seconds.

Tutorial: Add AI Comment Moderation to a React and Next.js App

Endpoint
POST /api/v1/ai/comment-moderate
Authentication
X-API-Key header
Price
3 credits per call
Rate limit
10 to 120 requests / minute by plan
Typical response
1 to 3 seconds
Format
JSON, UTF-8

Request parameters

Send these fields as a JSON body. An invalid or missing field returns a 422 error that names the field.

FieldTypeRequiredDescription
comment string Required The social media comment text (Max: 5,000 characters).
language string Optional Optional comment language identifier.
platform string Optional Optional social media platform name.
context string Optional Optional contextual details to aid analysis.

Code examples

Copy, replace rfh_your_api_key with your key and run. Prefer a client library? See the official SDKs.

request.sh
curl -X POST "https://rsflowhub.com/api/v1/ai/comment-moderate" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: rfh_your_api_key" \
  -d '{"comment":"Buy cheap followers now at http:\/\/fakefollowers.com !!! FAST DELIVERY!","platform":"YouTube"}'

Response

Every RSFlowHub endpoint uses the same envelope, so one parser handles all of them. Failed calls are not charged.

response.json
{
    "success": true,
    "request_id": "req_3f9a2c7e-5b1d-4e8a-9c2f-7d6e1a0b4c8d",
    "data": {
        "result": {
            "is_safe": false,
            "categories": [
                "harassment",
                "spam"
            ],
            "severity": "high",
            "recommended_action": "hide",
            "reason": "Insults other users and promotes an external offer.",
            "confidence": 0.93
        }
    },
    "meta": {
        "version": "v1",
        "timestamp": "2026-10-05T09:30:00Z"
    }
}
Envelope fields
FieldTypeMeaning
successbooleantrue when the call worked, false on any error.
request_idstringUnique id for this call. Quote it when you contact support.
data.resultobjectThe result of this endpoint (see the example).
errorobjectOnly on failure: code, message and details per field.
metaobjectAPI version and server timestamp.

All error codes: Errors reference

Features

Multi-Category Toxicity Scoring

Evaluates harassment, hate speech, severe toxicity, profanity, insult, and threat sub-scores (0.0 to 1.0).

Action Recommendation Engine

Returns automated recommended actions: "approve", "flag_for_review", "shadowban", or "delete".

Multi-Language Abuse Detection

Detects abusive slang, profanity, and harassment patterns across 50+ global languages.

Custom Community Thresholds

Configurable strictness parameters tailored for gaming chats, public social networks, or enterprise forums.

Use cases

How teams use the Automated Toxic Comment Filter & Moderation API in production.

Gaming & Live Streaming

Live Stream & Gaming Chat Moderation

Instantly filter out toxic chat messages, slurs, and profanity during high-volume live streaming events.

Input
Buy cheap followers now at http://fakefollowers.com !!! FAST DELIVERY!
Output
{"is_flagged": true, "categories": ["promotional_spam"], "recommended_action": "delete"}

Maintains a positive, safe chat environment for viewers.

Social SaaS

Social App & Forum Post Scrubbing

Auto-hide cyberbullying, harassment, and hate speech comments before they are published publicly.

Input
Nobody likes you, leave this platform immediately you idiot.
Output
{"is_flagged": true, "categories": ["harassment", "insult"], "recommended_action": "flag_for_review"}

Protects app users and community health.

E-Commerce Marketplace

E-Commerce Product Review Moderation

Filter out abusive fake reviews and profanity from product review sections prior to publishing.

Input
This product is absolute garbage, don't buy from these scamming fools!
Output
{"is_flagged": true, "categories": ["profanity", "toxicity"], "recommended_action": "flag_for_review"}

Preserves authentic, constructive buyer feedback.

Automated Toxic Comment Filter & Moderation API vs building it yourself

The same job done three ways.

TopicRSFlowHub APIRaw LLM promptsRules / regex
Output Validated JSON fieldsFree text you have to parseFixed patterns only
Setup One POST request, no promptsWrite and maintain prompts and parsingWrite and maintain rule lists
Provider outage Automatic fallback to a backup modelYou build retries and a second vendorNot applicable
Pricing 3 credits per call, failed calls freePer token, per vendorYour own servers and upkeep
Understands context Yes, AI modelYes, AI modelNo, keywords only

Frequently asked questions

Which toxicity categories does the moderation API detect?
The API detects toxicity, severe toxicity, insult, harassment, hate speech, threat, profanity, and promotional spam.
What action recommendations does the API return?
The API returns recommended actions: approve (safe content), flag_for_review (borderline content), shadowban (repetitive spam), or delete (severe policy violation).
Can I customize toxicity thresholds?
Yes! You can pass context rules to adjust strictness for gaming chats, public forums, or enterprise corporate platforms.
How fast is the Comment Moderation API?
Comment Moderation requests usually complete in 1 to 3 seconds, depending on input length and the AI model. Identical repeat requests are served from cache and return faster.
How many credits are deducted per request?
Comment Moderation API calls consume 3 base credits per request.

Start using the Automated Toxic Comment Filter & Moderation API

Free plan with 100 credits/month + 1,000 bonus credits when you sign in before 23 Nov. Test it in the playground first, no code needed.

RSFlowHub

Sign in to continue

You'll come straight back to this page.

Forgot password?

New to RSFlowHub? Create a free account