{
"id": "mod_example",
"model": "YOUR_MODEL_ID",
"results": [
{
"flagged": false,
"categories": {
"violence": false
},
"category_scores": {
"violence": 0.01
}
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}API reference
Create moderation
Moderate one text or an array of texts.
{
"id": "mod_example",
"model": "YOUR_MODEL_ID",
"results": [
{
"flagged": false,
"categories": {
"violence": false
},
"category_scores": {
"violence": 0.01
}
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"param": "<string>",
"code": "<unknown>"
}
}POST /v1/moderations
Send an explicit moderation model and nonempty input. This reference covers text and text arrays; model visibility does not imply moderation support, and image inputs require separate confirmation. When the model is omitted, the current implementation uses the historical text-moderation-latest default, which may not be available on your deployment.
Read flagged, categories, and category_scores from results in input order. Do not read choices or expect SSE. Missing moderation results never mean approval. Category names and extra fields depend on the upstream.
Channel response formatting, especially generic text ForceFormat, can affect moderation results. See the moderation guide and runnable example. This endpoint does not promise a universal free allowance; charges depend on deployment configuration.
阅读中文Authorizations
模型调用 API Key,不是控制台登录凭据 / Model API key, not console login credentials
Body
application/json
本规范覆盖文本与文本数组;不承诺全渠道多模态审核 / This specification covers text and text arrays, not universal multimodal moderation
Minimum string length:
1显式选择可用审核模型;省略时网关历史默认 text-moderation-latest 不保证可用 / Explicitly choose an available moderation model; the gateway historical default text-moderation-latest may be unavailable