内容安全检测
接口说明
检测一段文本是否包含违法违规内容
基本信息
名称 | 描述 |
---|---|
HTTP URL | https://developer.toutiao.com/api/v2/tags/text/antidirt |
HTTP Method | POST |
Scope | open.ttgame.mgplatform |
请求参数
请求头
content-type必填String
固定值"application/json"
X-Token必填String
示例:08011218462b6b4b5054626e426e50685a7554643144644449413d3d
Body展开全部子属性
tasks必填List
检测任务列表
展开子属性
请求示例
curl --location --request POST '/api/v2/tags/text/antidirt' \ --header 'content-type: application/json' \ --header 'access-token: 0801121846735352506a356a6' \ --data '{"tasks":[{"content":"SMsKLm5QBm"}]}' # 此示例仅为模板,请修改为更加符合业务规则的调用示例,方便开发者查看
响应参数
Body展开全部子属性
codeInt64
错误时返回
dataList
检测结果列表
展开子属性
error_idString
错误时返回
exceptionString
错误时返回
log_idString
请求 id
messageString
错误时返回
响应示例
{ "data": [ { "data_id": {}, "msg": "U5r45FQXnl", "code": 766082774174301600, "task_id": "DwB3AaJtdR", "predicts": [ { "model_name": "AGX2BDrgIY", "prob": 4664289278231060000, "hit": false, "target": "5jUWjby4Zs" } ] } ], "error_id": "INqJG38asr", "code": 742306510477745700, "message": "u0KxEDQvpM", "exception": "nhcI524VbB", "log_id": "C5Vz0wLqG1" }
错误码
HTTP 状态码 | 错误码 | 错误码描述 | 排查建议 |
---|---|---|---|
200 | 0 | 成功 | |
200 | 401 | AccessToken 失效/为空 | |
200 | 400 | tasks 数组为空 |