查询视频内容审核作业 - Querying a Video Moderation Job
功能介绍
查询视频审核作业处理状态与结果,并将识别结果返回给用户。
URI
GET /v3/{project_id}/moderation/video/jobs/{job_id}
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 项目ID。获取方法请参见获取项目ID。 |
job_id | 是 | String | 创建作业成功时,接口返回的job_id。 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 用户Token。 通过调用IAM服务获取用户Token接口获取(响应消息头中X-Subject-Token的值)。 |
响应参数
状态码: 200
参数 | 参数类型 | 描述 |
|---|---|---|
request_id | String | 本次请求的唯一标识,用于问题排查,建议保存。 |
job_id | String | 作业id。 |
status | String | 作业状态,可取值有:
|
request_params | request_params object | 作业创建参数。 |
create_time | String | 作业创建时间。 |
update_time | String | 作业更新时间。 |
result | result object | 作业审核结果,当作业状态为succeeded时存在。 |
参数 | 参数类型 | 描述 |
|---|---|---|
data | data object | 创建作业时传的data参数。 |
event_type | String | 创建作业时传的event_type参数。 事件类型,枚举值如下:
|
image_categories | Array of strings | 创建作业时传的image_categories参数。 视频中画面需要检测的风险类型,枚举值如下:
|
audio_categories | Array of strings | 创建作业时传的audio_categories参数。 视频中音频需要检测的风险类型,枚举值如下:
|
callback | String | 创建作业时传的callback参数。 |
参数 | 参数类型 | 描述 |
|---|---|---|
suggestion | String | 视频审核结果是否通过。
|
image_detail | Array of image_detail objects | 图像审核详情。 |
audio_detail | Array of audio_detail objects | 音频审核详情。 |
参数 | 参数类型 | 描述 |
|---|---|---|
suggestion | String | 图像审核结果是否通过。
|
category | String | 检测结果的一级标签。 支持category列表如下:
|
ocr_text | String | 图文审核检测出的文本,只有在category参数配置image_text且检测出文本时展示该字段。 |
time | Float | 截帧在视频文件中的时间,单位为秒。 |
detail | Array of detail objects | 图像帧审核详情。 |
参数 | 参数类型 | 描述 |
|---|---|---|
confidence | Float | 置信度,可选值在0-1之间,值越大,可信度越高。 |
category | String | 检测结果的一级标签。 支持category列表如下:
|
suggestion | String | 审核结果是否通过。
|
label | String | 识别的详细标签。 |
face_location | face_location object | 人物位置信息。 |
qr_location | qr_location object | 二维码位置信息。 |
qr_content | String | 图片中二维码指向的链接,当请求参数categories中包含image_text时存在。 |
segments | Array of segments objects | image_text场景下命中的文本片段。 |
参数 | 参数类型 | 描述 |
|---|---|---|
top_left_x | Integer | 检测出人脸的左上角横坐标。 |
top_left_y | Integer | 检测出人脸的左上角纵坐标。 |
bottom_right_x | Integer | 检测出人脸的右下角横坐标。 |
bottom_right_y | Integer | 检测出人脸的右下角纵坐标。 |
参数 | 参数类型 | 描述 |
|---|---|---|
top_left_x | Integer | 检测出的二维码左上角横坐标。 |
top_left_y | Integer | 检测出的二维码左上角纵坐标。 |
bottom_right_x | Integer | 检测出的二维码右下角横坐标。 |
bottom_right_y | Integer | 检测出的二维码右下角纵坐标。 |
参数 | 参数类型 | 描述 |
|---|---|---|
suggestion | String | 音频片段审核结果是否通过。
|
label | String | 音频片段检测标签,选取detail中置信度最大的标签,可取值如下:
|
audio_text | String | 音频片段文本内容。 |
end_time | Float | 音频片段结束时间。 |
start_time | Float | 音频片段开始时间。 |
detail | Array of detail objects | 音频片段审核详情。 |
参数 | 参数类型 | 描述 |
|---|---|---|
confidence | Float | 风险置信度。 |
label | String | 风险标签。 |
suggestion | String | 审核处理建议。
|
segments | Array of segments objects | 命中的风险片段信息列表,如果命中语义算法模型,则该字段不会存在。 |
参数 | 参数类型 | 描述 |
|---|---|---|
segment | String | 命中的风险片段。 |
状态码: 400
参数 | 参数类型 | 描述 |
|---|---|---|
error_code | String | 调用失败时的错误码,具体请参见错误码。 调用成功时无此字段。 |
error_msg | String | 调用失败时的错误信息。 调用成功时无此字段。 |
请求示例

“endpoint”即调用API的请求地址,不同服务不同区域的endpoint不同,具体请参见终端节点。
GET https://{endpoint}/v3/{project_id}/moderation/video/jobs/{job_id} 响应示例
状态码: 200
成功响应示例
{
"request_id" : "xxxx",
"job_id" : "xxx",
"status" : "succeeded",
"request_params" : {
"data" : {
"url" : "xxxx",
"frame_interval" : 5
},
"event_type" : "default",
"image_categories" : [ "porn", "politics", "terrorism", "image_text" ],
"audio_categories" : [ "porn", "ad", "politics", "moan", "abuse" ],
"callback" : "xxx"
},
"create_time" : "2022-07-30T08:57:11.011Z",
"update_time" : "2022-07-30T08:57:14.014Z",
"result" : {
"suggestion" : "block",
"image_detail" : [ {
"suggestion" : "block",
"category" : "porn",
"ocr_text" : "123",
"time" : 0,
"detail" : [ {
"confidence" : 0.676015138626099,
"category" : "porn",
"suggestion" : "block",
"label" : "pornography"
}, {
"confidence" : 0.666015138626099,
"category" : "porn",
"suggestion" : "review",
"label" : "sexy_female"
}, {
"confidence" : 0.666015138626099,
"category" : "xxx",
"suggestion" : "block",
"label" : "leader"
}, {
"confidence" : 0.691423773765564,
"category" : "xxx",
"suggestion" : "block",
"face_location" : {
"top_left_x" : 12,
"top_left_y" : 13,
"bottom_right_x" : 200,
"bottom_right_y" : 240
},
"label" : "leader"
}, {
"confidence" : 0.691423773765564,
"category" : "porn",
"suggestion" : "block",
"face_location" : {
"top_left_x" : 12,
"top_left_y" : 13,
"bottom_right_x" : 100,
"bottom_right_y" : 2000
},
"label" : "leader"
}, {
"confidence" : 0.891423773765564,
"category" : "image_text",
"suggestion" : "block",
"label" : "qr_code"
}, {
"confidence" : 0.891423773765564,
"category" : "image_text",
"suggestion" : "block",
"label" : "qr_code",
"qr_content" : "xxxxxxxxx",
"qr_location" : {
"top_left_x" : 12,
"top_left_y" : 13,
"bottom_right_x" : 100,
"bottom_right_y" : 2000
}
}, {
"confidence" : 0.891423773765564,
"category" : "image_text",
"suggestion" : "block",
"label" : "porn",
"segments" : [ {
"segment" : "xxx"
}, {
"segment" : "xx"
} ]
} ]
} ],
"audio_detail" : [ {
"suggestion" : "block",
"label" : "porn",
"audio_text" : "xxxxx",
"end_time" : 10,
"start_time" : 0,
"detail" : [ {
"confidence" : 0.999117187582349,
"label" : "porn",
"suggestion" : "block",
"segments" : [ {
"segment" : "xxx"
} ]
}, {
"confidence" : 0.885117187582349,
"label" : "porn",
"suggestion" : "block"
} ]
} ]
}
} 状态码: 400
失败响应示例
{
"error_code" : "AIS.0030",
"error_msg" : "Job not found"
} 状态码
状态码 | 描述 |
|---|---|
200 | 查询成功时返回作业状态和结果。 |
400 | 查询失败时返回错误原因。 |

