curl --request POST \
--url https://kaienapi.com/v1/moderations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "需要审核的文本"
}
'{}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}OpenAI Moderations 兼容接口,在入库、发布或生成前对文本片段做风险判断。
请求格式
input 接收字符串或字符串数组。批量提交时,响应结果顺序与输入顺序保持一致。未传 model 时使用默认审核模型。
接入位置
可放在用户内容发布前、Prompt 提交前、模型输出后,或后台历史内容扫描任务中。
读取结果
根据分类、分数和 flagged 状态决定应用动作。审核结果供风控判断使用,不建议把原始分类名直接展示给最终用户。
POST
/
v1
/
moderations
curl --request POST \
--url https://kaienapi.com/v1/moderations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "需要审核的文本"
}
'{}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>"
}
}