内容审核 /v1/moderations
POST
/v1/moderations这个是用于查询内容是否符合OpenAI的审核规则,这个接口是免费的,不会扣减点数
请求参数
Body 参数application/json
No schema defined
示例
{
"input": "I want to kill them."
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
id
string
必需
model
string
必需
results
array [object {3}]
必需
categories
object
分类
category_scores
object
可选
flagged
boolean
可选
示例
{
"id": "modr-5MWoLO",
"model": "text-moderation-001",
"results": [
{
"categories": {
"hate": false,
"hate/threatening": true,
"self-harm": false,
"sexual": false,
"sexual/minors": false,
"violence": true,
"violence/graphic": false
},
"category_scores": {
"hate": 0.22714105248451233,
"hate/threatening": 0.4132447838783264,
"self-harm": 0.005232391878962517,
"sexual": 0.01407341007143259,
"sexual/minors": 0.0038522258400917053,
"violence": 0.9223177433013916,
"violence/graphic": 0.036865197122097015
},
"flagged": true
}
]
}
最后修改时间: 1 年前