OpenAI 兼容的文本审核接口,原样透传 flagged、categories 和 category_scores。
https://zerofa.ai/v1/moderationsmodelstring必填<moderation-model>inputstring | string[]必填需要审核的文本响应保持 OpenAI 结构,包含 results[].flagged、categories 和 category_scores。审核通常免费或价格极低。
用下面的示例确认请求格式与返回结构。需要在线发起请求时,点击页面顶部“调试”拉起在线运行面板。
curl https://zerofa.ai/v1/moderations \
-H "Authorization: Bearer sk-zerofa-xxx" \
-H "Content-Type: application/json" \
-d '{
"model": "<moderation-model>",
"input": "需要审核的文本"
}'{
"id": "modr-...",
"model": "<moderation-model>",
"results": [
{ "flagged": true,
"categories": { "violence": true, "hate": false },
"category_scores": { "violence": 0.91 } }
]
}