Toxic Comment Filter API

Detect and classify toxic or harmful content in user-generated text.

🟢 Endpoint

POST https://kubus.co.id/api/v1/moderation/toxic/batch

Enable

🔐 Headers

Use your API key to authorize requests. Replace YOUR_API_KEY with your actual key.

                Authorization: Bearer YOUR_API_KEY
                Content-Type: application/json
            
Manage Your API Keys

📦 Request Body

Configured Entity Groups

No entity groups configured yet.

Example request body:


            {
                "entity_group": "toxic_1",
                "texts": [
                    "You are stupid",
                    "I love this!",
                    "That was the worst service ever",
                    "Great work team!"
                ]
            }

✅ Response

A successful response will identify whether each text is toxic, and if so, the category:


            {
            "results": [
                {
                "category": "insult",
                "text": "You are stupid",
                "toxic": true
                },
                {
                "text": "I love this!",
                "toxic": false
                },
                {
                "category": "harsh_criticism",
                "text": "That was the worst service ever",
                "toxic": true
                },
                {
                "text": "Great work team!",
                "toxic": false
                }
            ],
            "status": "success"
            }

Notes

  • toxic: Indicates if the content is considered harmful.
  • category: Specifies the type of toxicity (e.g., insult, hate speech, harsh criticism).
  • Maximum 10 texts per batch.
  • Use this API to moderate user-generated content in forums, chats, reviews, etc.