Skip to main content
POST
/
api
/
v1
/
moderation
/
text
Moderate text for profanity
curl --request POST \
  --url https://modbase.dev/api/v1/moderation/text \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "message": "This is an example message"
}
'
{
  "profanity": true,
  "probability": 0.93,
  "detected": "example-word"
}

Authorizations

x-api-key
string
header
required

Body

application/json
message
string
required

Text to analyze. Maximum 35 words or 1000 characters.

Example:

"This is an example message"

Response

Moderation result

profanity
boolean
required
Example:

true

probability
number<float>
required
Example:

0.93

detected
string
required

Detected profane word or phrase

Example:

"example-word"