文章综合审核
POST
/api/v1/moderate/article文章综合审核接口,并发执行文本审核(go-sensitive-word DFA)和图片审核(nsfwdetection NSFW),返回综合判定与各段结果。
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| text | string | 可选 | 文章正文文本(与 image_urls 至少提供一个) |
| image_urls | array<string> | 可选 | 图片 URL 列表(与 text 至少提供一个) |
请求示例
bash
curl -X POST https://api.ogmiao.com/api/v1/moderate/article \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"text": "文章正文内容",
"image_urls": ["https://example.com/1.jpg"]
}'响应示例
JSON
{
"is_safe": true,
"text_result": {
"is_safe": true,
"violations": [],
"total_violations": 0
},
"image_results": [
{
"image_url": "https://example.com/1.jpg",
"is_safe": true,
"nsfw_percentage": 0.02,
"sfw_percentage": 0.98
}
],
"total_violations": 0,
"summary": "内容审核通过,未发现违规"
}