Skip to main content

TextModerationRequest

Request schema for single text moderation.

Schema

{
  "text": "string"
}

Fields

text
string
required
The text to moderateMin length: 1 character Max length: 10,000 characters (recommended) Type: string

Example

{
  "text": "Your text to moderate here"
}

BatchModerationRequest

Request schema for batch text moderation.

Schema

{
  "texts": ["string"]
}

Fields

texts
array
required
Array of texts to moderateMin items: 1 Max items: 100 (recommended) Item type: string

Example

{
  "texts": [
    "First text to moderate",
    "Second text to moderate",
    "Third text to moderate"
  ]
}

See Also