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_KEYRequest body
Content-Type:application/json
| Field | Type | Required | Description |
|---|---|---|---|
| input | string | string[] | — | |
| model | string | — | — |
Responses
200Moderation created
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | — | — |
| model | string | — | — |
| results | object[] | — | — |
| flagged | boolean | — | — |
| categories | object | — | — |
| category_scores | object | — | — |
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"
}'
