New APINew API
API 参考AI 应用
AI 模型接口审查

内容审核

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

POST
/v1/moderations

Authorization

BearerAuth

AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

In: header

Request Body

application/json

model?string

审核模型

input*string|

要审核的文本

Response Body

application/json

curl -X POST "https://docs.newapi.ai/v1/moderations" \  -H "Content-Type: application/json" \  -d '{    "input": "string"  }'
{
  "id": "string",
  "model": "string",
  "results": [
    {
      "flagged": true,
      "categories": {
        "property1": true,
        "property2": true
      },
      "category_scores": {
        "property1": 0,
        "property2": 0
      }
    }
  ]
}

这篇文档对您有帮助吗?