检测图片是否包含违法违规内容
接口地址POSThttps://developer.toutiao.com/api/v2/tags/image/⚠️注意该接口请在开发者服务器端请求
输入
请求Headers名称描述X-Token小程序access_token,参考登录凭证检验
请求Body{targets:[ad,porn],tasks:[{image:https://image.url}]}名称描述targets图片检测服务类型,目前支持porn、politics、ad、disgusting四种tasks检测任务列表image检测的图片链接
输出正确返回的JSON如下:{log_id:2019010320551501001001621510071,data:[{code:0,task_id:d18197c4-0f56-11e9-99a5-0242ac110004,data_id:null,cached:false,predicts:[{prob:1,model_name:image_ocr,target:ad},{prob:0,model_name:image_qrcode,target:ad}],msg:ok},{code:0,task_id:d1aedc02-0f56-11e9-99a5-0242ac110004,data_id:null,cached:false,predicts:[{prob:0.0005013857153244317,model_name:image_porn,target:porn},{prob:0.022131478413939476,model_name:image_vulgar,target:porn}],msg:ok}]}名称描述log_id请求iddata检测结果列表code检测结果-状态码msg检测结果-消息data_id检测结果-数据idtask_id检测结果-任务idpredicts检测结果-置信度列表target检测结果-置信度-服务/目标model_name检测结果-置信度-模型/标签prob检测结果-置信度-概率,值为0或者1,当值为1时表示检测的图片有违法违规内容比如是广告当access_token检验失败时会返回如下信息:{error_id:dd60b2bef95f40d7a4ace0bf5130d2e7,code:401,message:Authenticationcredentialswerenotprovided.,exception:Authenticationcredentialswerenotprovided.}了解更多