Check whether text content violates usage policies
Request
Provide your bearer token in the Authorization
header when making requests to protected resources. Example:Authorization: Bearer ********************
or
Body Params application/jsonRequired
{
"input": "string",
"model": "text-moderation-latest"
}
Request Code Samples
curl --location '/v1/moderations' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"input": "string",
"model": "text-moderation-latest"
}'
Responses
Moderation completed successfully
{
"id": "string",
"model": "string",
"results": [
{
"flagged": true,
"categories": {},
"category_scores": {}
}
]
}
Modified at 2026-05-23 05:25:05