- OpenAI
- Claude
- Midjourney
- 翻译
- 文心一言
- Stable Diffusion
内容审核 /v1/moderations
POST
https://api.aigc2d.com/v1/moderations
OpenAI
请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
Body 参数application/json
model
enum<string> <string>
可选
枚举值:
text-moderation-stabletext-moderation-latest
input
string <string>
要审查的文本
示例
{
"input": "I want to kill them."
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.aigc2d.com/v1/moderations' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": "I want to kill them."
}'
返回响应
🟢200成功
application/json
Body
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
}
]
}
修改于 2023-06-26 10:42:26