Appearance
原生OpenAI格式
原生OpenAI格式
POST/v1/moderations检查文本内容是否违反使用政策
请求头 (Headers)
| 参数名 | 类型 | 必选 | 描述 | 示例 |
|---|---|---|---|---|
Authorization | string | 否 | 鉴权令牌 | Bearer ******************** |
请求体 (Request Body)
Content-Type: application/json
| 字段 | 类型 | 必选 | 描述 |
|---|---|---|---|
| input | any | 是 | |
| model | string | 否 |
请求体示例
json
{
"input": null,
"model": "text-moderation-latest"
}返回响应 (Responses)
200 - 成功审核
| 字段 | 类型 | 描述 |
|---|---|---|
| id | string | |
| model | string | |
| results | array of object | |
| results[].flagged | boolean | |
| results[].categories | object | |
| results[].category_scores | object |
响应示例
json
{
"id": "string",
"model": "string",
"results": [
{
"flagged": true,
"categories": {},
"category_scores": {}
}
]
}