Create moderation

post/v1/moderations

Check whether text content violates the usage policy.

Authentication

Send your OLETOKEN API key as a Bearer token. Keys are created on the API Keys page of the console.

Authorization: Bearer $OLETOKEN_API_KEY

Request body

Content-Type:application/json

FieldTypeRequiredDescription
inputstring | string[]—
modelstring——

Responses

200Moderation created

FieldTypeRequiredDescription
idstring——
modelstring——
resultsobject[]——
flaggedboolean——
categoriesobject——
category_scoresobject——

Example request

curl -X POST 'https://api.oletoken.ai/v1/moderations' \
  -H "Authorization: Bearer $OLETOKEN_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "input": "string"
  }'