Send a text moderation request for immediate moderation.

Moderate Text

POST https://api.chatsight.ai/text/moderation

HEADER x-chatsight-api-auth: <API-TOKEN>

Request

curl --location --request POST 'https://api.chatsight.ai/text/moderation' \
--header 'x-chatsight-api-auth: <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{"sample":"Hello World!"}'
axios.post('https://api.chatsight.ai/text/moderation',{sample: "Hello World!"},{headers:{"x-chatsight-api-auth":"<YOUR-API-KEY>"}})
.then(response => {
  if(response.data && response.data.success){
    return response.data
  }else{
    return false
  }
}).catch(err => {return err})

Response

{
    "api": "chatsight-lang-text",
    "success": true,
    "response": {
        "engine1": {
            "baseline": 0.9917805790901184,
            "raceInvocation": 0.00004964975960319862,
            "politicalLanguage": 0.00816978421062231
        },
        "engine2": {
            "raceInvocation": 0.00008660718594910577,
            "defensive": 0.00013779581058770418,
            "baseline": "...",
            "aggressive": 0.00009418639820069075,
            "vulgar": 0
        },
        "engine3": {
            "invoked":false
        },
        "suggestedAction": [
            "pass",
            1.8247238182508048
        ],
        "patches": {
            "extremistFormattingPatch": false,
            "miscWordChoicePath": false,
            "shortVulgarityCommentLeniency": true,
            "modelTrainingWordPatch": [
                false
            ],
            "curseWordOverride": false,
            "sentimentScore": 0.30000001192092896
        },
        "insights": {
            "dialectPrediction": [
                "english",
                0.3921568627450981
            ]
        },
        "metadata": {
            "modelTrainingWords": [
                "...",
                "..."
            ],
            "computeTime": 97,
            "times": [
                97.01920700073242,
                50.57519197463989,
                1.1041039824485779,
                56.532256960868835,
                99.28859001398087
            ],
            "uuid": "...",
            "warningIssued": false,
            "endpoint": "...",
            "alloc": "...",
            "latencyAlert": false
        },
        "operator": {}
    },
    "TOS": "...",
    "version": "..."
}