Skip to main content
POST
/
moderations
Check content moderation
curl --request POST \
  --url https://api.anyapi.ai/v1/moderations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "Sample text goes here",
  "model": "text-moderation-stable"
}
'
{
  "id": "<string>",
  "model": "<string>",
  "results": [
    {
      "flagged": true,
      "categories": {},
      "category_scores": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer token authentication. Get your API key from the dashboard.

Body

application/json
input
string
required

The text to check for moderation

Example:

"Sample text goes here"

model
string
required

The moderation model to use

Example:

"text-moderation-stable"

Response

Successful response

id
string

Response identifier

model
string

Model used for moderation

results
object[]