Skip to content

原生OpenAI格式 ​

原生OpenAI格式 ​

POST /v1/moderations

检查文本内容是否违反使用政策

请求头 (Headers) ​

参数名类型必选描述示例
Authorizationstring否鉴权令牌Bearer ********************

请求体 (Request Body) ​

Content-Type: application/json

字段类型必选描述
inputany是
modelstring否

请求体示例 ​

json
{
  "input": null,
  "model": "text-moderation-latest"
}

返回响应 (Responses) ​

200 - 成功审核 ​

字段类型描述
idstring
modelstring
resultsarray of object
results[].flaggedboolean
results[].categoriesobject
results[].category_scoresobject

响应示例 ​

json
{
  "id": "string",
  "model": "string",
  "results": [
    {
      "flagged": true,
      "categories": {},
      "category_scores": {}
    }
  ]
}

Released under the MIT License.