K

Moderations

post
/moderations

Body params

Name
input
Required
Description
The input text to classify
Name
model
Type
string
Description
Two content moderations models are available: `text-moderation-stable` and `text-moderation-latest`. The default is `text-moderation-latest` which will be automatically upgraded over time. This ensures you are always using our most accurate model. If you use `text-moderation-stable`, we will provide advanced notice before updating the model. Accuracy of `text-moderation-stable` may be slightly lower than for `text-moderation-latest`.

Response

JSON
{
  "id": "string",
  "model": "string",
  "results": [
    {
      "flagged": true,
      "categories": {
        "hate": true,
        "hate/threatening": true,
        "self-harm": true,
        "sexual": true,
        "sexual/minors": true,
        "violence": true,
        "violence/graphic": true
      },
      "category_scores": {
        "hate": 0,
        "hate/threatening": 0,
        "self-harm": 0,
        "sexual": 0,
        "sexual/minors": 0,
        "violence": 0,
        "violence/graphic": 0
      }
    }
  ]
}