v1
latestOpenAPI 3.1.02026-07-2219165126.1 KBModerations
Create a moderation
Classify text or image inputs against moderation categories and scores.
post/v1/moderations
Request body
Example request
{
"input": [
{
"text": "I want to hurt someone.",
"type": "text"
},
{
"image_url": {
"url": "https://example.com/image.png"
},
"type": "image_url"
}
],
"model": "omni-moderation-latest"
}Response
Successful Response
Example response
{
"id": "mdr_123",
"model": "omni-moderation-latest",
"results": [
{
"categories": {
"self-harm": false,
"violence": true
},
"category_applied_input_types": {
"violence": [
"text"
]
},
"category_scores": {
"self-harm": 0.04,
"violence": 0.92
},
"flagged": true
}
]
}