cURL
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": {} } ] }
检查文本内容是否违反使用政策
使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx
Authorization: Bearer sk-xxxxxx
"text-moderation-latest"
成功审核
Show child attributes
Was this page helpful?