网页审核
本文提供了调用网页同步审核具体接口和参数说明。温馨提示:调用此服务API需登录智汇云官网进行开通,https://zyun.360.cn/manage
接口名
/v1/verify/web
请求域名
ai.zyun.360.cn
通讯协议
支持通过HTTP协议进行请求通信
请求方式
支持post方式发送请求
请求参数
参数 |
参数名 |
参数描述 |
Authorization |
鉴权信息 |
鉴权信息规则参见下方规则详细描述。 |
Auth-Time |
当前时间 |
规则参见下方详细描述。 |
Rand-Num |
随机数 |
规则参见下方详细描述。 |
Auth-Ver |
版本号 |
固定值:1.0 |
参数名称 |
说明 |
用法 |
Authorization |
认证字符串 |
生成第一步:将AK、auth_time、rand_num、param_sign 拼接成一个字符串、中间用”\n”分隔。第二步:用SK对第一步生成的字符串做sha1加密,生成authorization |
Auth-Ver |
认证版本 |
1.0 |
Auth-Time |
认证时间 |
表示此次操作的时间,unix系统时间戳(10位)(不能为空,如果请求中的Auth-Time时间和服务器的时间差15分钟以上,服务器将拒绝该服务,并返回ERROR错误) |
Rand-Num |
随机正整数 |
表示一个随机正整数(rand生成即可) |
Authorization生成规则
$auth_time = time();
$auth_string = $ak . "\n" . $auth_time . "\n" . $rand_num . "\n" . $param_sign;
$encrypt_string = base64_encode(hash_hmac("sha1", $auth_string, $sk, true));
$authorization = $ak . ":" . $encrypt_string;
构造密码串
body中传递的参数(post)
参数名称 |
必选 |
类型 |
参数说明 |
template_id |
true |
string |
网页审核模板ID,在控制台中可以创建 |
url |
true |
string |
审核url地址 |
callback |
false |
string |
回调地址 |
scene |
false |
string |
业务使用场景。可选值: (live:直播,shopping:电商,game: 游戏,news:新闻资讯,forum:论坛,social:社交) |
请求示例
POST /v1/verify/web HTTP/1.1
Auth-Ver: 1.0
Auth-Time: 1587974786
Rand-Num: 8888
Authorization:xxxxxxxxxxxxxxxxxxxx
User-Agent: PostmanRuntime/7.24.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 14a15c58-c5fa-4712-90d4-24534b491232
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: multipart/form-data; boundary=
Content-Length: 562
----------------------------769354003527143578128173
Content-Disposition: form-data; name="template_id"
158771917344392482224503
----------------------------769354003527143578128173
Content-Disposition: form-data; name="url"
https:
同步返回结果说明
参数名称 |
必选 |
类型 |
参数说明 |
errcode |
true |
int |
错误码 |
errmsg |
true |
string |
错误描述 |
data |
true |
json |
响应结果 |
data结构
参数名称 |
必选 |
类型 |
参数说明 |
taskid |
true |
string |
网页审核任务ID |
request_time |
true |
string |
请求时间 |
cost |
true |
string |
处理时间 |
body |
true |
json |
审核返回体 |
body结构
参数名称 |
必选 |
类型 |
参数说明 |
text |
true |
string |
审核url |
suggest_summary |
true |
string |
审核结果(PASS:正常,建议直接放行 REVIEW:可疑,建议人工审核 REJECT:违规,建议直接拦截) |
suggest_summary_desc |
true |
string |
审核描述 |
items |
true |
[]json |
审核违规详情 |
items结构
参数名称 |
必选 |
类型 |
参数说明 |
text |
true |
string |
审核url |
beginPosition |
true |
int |
当前内容片段在输入中的起始位置 |
endPosition |
true |
int |
当前内容片段在输入中的结束位置 |
description |
true |
string |
当前内容片段的风险描述 |
riskLevel |
true |
string |
PASS:通过 REVIEW:审核 REJECT:拒绝 |
riskType |
true |
string |
当 type 为文本时: 0:正常 100:涉政 200:色情 210:辱骂 300:广告 400:灌水 500:无意义 600:违禁 700:黑名单 710:白名单 800:高危账号 900:自定义 当 type 为图片时: 0:正常 100:涉政 200:色情 210:性感 300:广告 310:二维码 320:水印 400:暴恐 500:违规 510:不良场景 520:未成年人 700:黑名单 710:白名单 800:高危账号 |
content |
true |
string |
审核内容 |
type |
true |
string |
审核类型 |
同步返回示例
{"errcode":0,"errmsg":"ok","data":{"taskid":"TID_TT_20220920866964079678096","request_time":1663643202,"cost":0.233516791,"body":{"sid":"Web_V_SHM_866964130009744","text":"https://misc.360buyimg.com/mtd/pc/index_2019/1.0.0/static/css/first-screen.chunk.css","suggest_summary":"REJECT","suggest_summary_desc":"文本内容违规,建议直接拦截","request_id":"64569aab604197ffeadbb428d49aee32","items":["{\"beginPosition\":0,\"content\":\"https://misc.360buyimg.com/mtd/pc/index_2019/1.0.0/static/css/first-screen.chunk.css\",\"description\":\"广告:联系方式:网址\",\"endPosition\":83,\"index\":0,\"model\":\"MA000007015010002\",\"riskLevel\":\"REJECT\",\"riskType\":300,\"type\":\"text\"}"]}}}
同步查询网页审核结果
接口名
/v1/verify/webQuery
请求域名
ai.zyun.360.cn
通讯协议
支持通过HTTP协议进行请求通信
请求方式
支持post方式发送请求
请求参数
参数 |
参数名 |
参数描述 |
Authorization |
鉴权信息 |
鉴权信息规则参见鉴权详细描述。 |
Auth-Time |
当前时间 |
规则参见鉴权详细描述。 |
Rand-Num |
随机数 |
规则参见鉴权详细描述。 |
Auth-Ver |
版本号 |
固定值:1.0 |
body中传递的参数(post)
参数名称 |
必选 |
类型 |
参数说明 |
template_id |
true |
string |
网页审核模板ID,在控制台中可以创建 |
taskid |
true |
string |
网页审核任务唯一标识 |
请求示例
POST /v1/verify/webQuery HTTP/1.1
Auth-Ver: 1.0
Auth-Time: 1587974786
Rand-Num: 8888
Authorization:xxxxxxxxxxxxxxxxxxxx
User-Agent: PostmanRuntime/7.24.1
Accept: */*
Cache-Control: no-cache
Postman-Token: 14a15c58-c5fa-4712-90d4-24534b491232
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Type: multipart/form-data; boundary=
Content-Length: 562
----------------------------769354003527143578128173
Content-Disposition: form-data; name="template_id"
158771917344392482224503
----------------------------769354003527143578128173
Content-Disposition: form-data; name="taskid"
TID_V_20220602297706882902327
返回结果说明
参数名称 |
必选 |
类型 |
参数说明 |
errcode |
true |
int |
错误码 |
errmsg |
true |
string |
错误描述 |
data |
true |
json |
响应结果 |
data结构
参数名称 |
必选 |
类型 |
参数说明 |
taskid |
true |
string |
网页审核任务ID |
request_time |
true |
string |
请求时间 |
cost |
true |
string |
处理时间 |
body |
true |
json |
审核返回体 |
body结构
参数名称 |
必选 |
类型 |
参数说明 |
text |
true |
string |
审核url |
suggest_summary |
true |
string |
审核结果(PASS:正常,建议直接放行 REVIEW:可疑,建议人工审核 REJECT:违规,建议直接拦截) |
suggest_summary_desc |
true |
string |
审核描述 |
items |
true |
[]json |
审核违规详情 |
items结构
参数名称 |
必选 |
类型 |
参数说明 |
text |
true |
string |
审核url |
beginPosition |
true |
int |
当前内容片段在输入中的起始位置 |
endPosition |
true |
int |
当前内容片段在输入中的结束位置 |
description |
true |
string |
当前内容片段的风险描述 |
riskLevel |
true |
string |
PASS:通过 REVIEW:审核 REJECT:拒绝 |
riskType |
true |
string |
当 type 为文本时: 0:正常 100:涉政 200:色情 210:辱骂 300:广告 400:灌水 500:无意义 600:违禁 700:黑名单 710:白名单 800:高危账号 900:自定义 当 type 为图片时: 0:正常 100:涉政 200:色情 210:性感 300:广告 310:二维码 320:水印 400:暴恐 500:违规 510:不良场景 520:未成年人 700:黑名单 710:白名单 800:高危账号 |
content |
true |
string |
审核内容 |
type |
true |
string |
审核类型 |
同步返回示例
{"errcode":0,"errmsg":"ok","data":{"taskid":"TID_TT_20220920866964079678096","request_time":1663643202,"cost":0.233516791,"body":{"sid":"Web_V_SHM_866964130009744","text":"https://misc.360buyimg.com/mtd/pc/index_2019/1.0.0/static/css/first-screen.chunk.css","suggest_summary":"REJECT","suggest_summary_desc":"文本内容违规,建议直接拦截","request_id":"64569aab604197ffeadbb428d49aee32","items":["{\"beginPosition\":0,\"content\":\"https://misc.360buyimg.com/mtd/pc/index_2019/1.0.0/static/css/first-screen.chunk.css\",\"description\":\"广告:联系方式:网址\",\"endPosition\":83,\"index\":0,\"model\":\"MA000007015010002\",\"riskLevel\":\"REJECT\",\"riskType\":300,\"type\":\"text\"}"]}}}
错误码说明
错误码 |
说明 |
0 |
正常 |
400001 |
未知错误 |
400002 |
系统内部错误 |
400003 |
签名错误 |
400004 |
参数错误 |
401000 |
任务队列满了 |
401001 |
任务执行超时 |
440001 |
图片地址不可用 |
440002 |
图片审核失败 |
440004 |
系统负载过高 |
440005 |
任务不存在 |
440006 |
任务处理中 |
440101 |
模板ID格式错误 |
440102 |
图片ID格式错误 |
440103 |
审核类型格式错误 |
440104 |
图片格式错误 |
440105 |
图片内容格式错误 |
440106 |
回调地址格式错误 |