Skip to main content
POST
/
v1
/
moderations
内容审核
curl --request POST \
  --url https://api.tkhub.ai/v1/v1/moderations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "<string>",
  "model": "text-moderation-latest"
}
'
{
  "id": "<string>",
  "model": "<string>",
  "results": [
    {
      "flagged": true,
      "categories": {},
      "category_scores": {}
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
input
required
model
string
Example:

"text-moderation-latest"

Response

200 - application/json

成功审核

id
string
model
string
results
object[]