Content moderation
📃 Description
Automatically detect unwanted content and enforce your moderation rules
️ Request example
️ Request parameters
NameTypeExampleDescription
text
required
string
I love this restaurant, the view isn't nice but the food is always great!
Text content to analyse (500 characters maximum)
keywords
object
{ "negative": [ "awful", "terrible" ], "positive": [ "food" ] }
Categories of words to detect in the content
keywords.category
array
[ "awful", "terrible" ]
List of words to detect for the given category
️ Response example
️ Response data
NameTypeExampleDescription
safetyScore
number
0.9
Score between 0 and 1 expressing how safe the content is
reason
string
Positive sentiment with a minor complaint about the view.
Short explanation of the text moderation analysis
hateSpeechScore
number
0.08
Probability between 0 and 1 of the text containing hate speech
dangerousContentScore
number
0.16
Probability between 0 and 1 of the text containing dangerous elements
harassmentScore
number
0.14
Probability between 0 and 1 of the text containing harassment
sexuallyExplicitScore
number
0.11
Probability between 0 and 1 of the text containing sexually explicit language
spamScore
number
0.07
Probability between 0 and 1 of the text containing spam or clikbait content
keywordMatches
object
{ "negative": false, "positive": true }
Indicates the detection of keywords for each category
keywordMatches.category
boolean
false
Indicates the detection of keywords for the given category