Moderations
Run safety moderation on text or images, returning a per-category verdict on whether each is flagged — compatible with the OpenAI Moderations protocol.
Basics
MethodPOST
Endpointhttps://koprouter.kopglobal.com/v1/moderations
AuthenticationAuthorization: Bearer sk-...
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model |
string | Yes | Moderation model ID |
input |
string/array | Yes | Text or image(s) to moderate |
Example Request
curl https://koprouter.kopglobal.com/v1/moderations \
-H "Authorization: Bearer sk-..." \
-H "Content-Type: application/json" \
-d '{
"model": "MODEL_ID",
"input": "I want to harm someone."
}'
Example Response
{
"id": "modr-abc123",
"model": "MODEL_ID",
"results": [
{
"flagged": true,
"categories": {
"hate": false,
"violence": true
},
"category_scores": {
"hate": 0.01,
"violence": 0.98
}
}
]
}