Manual video review
This topic describes how to call the /green/video/manual/asyncScan operation to submit videos for manual review. In addition to machine-based detection, AI Guardrails also provides a manual review service. Use the manual review feature if you require high accuracy and recall rates.
Before you use this service, contact our account manager to confirm the review standards and content scope. This API call does not return machine detection results. If you need machine detection results, call the detection service API. For more information about the detection service API, see Synchronous Detection and Asynchronous Detection.
Instructions for manual video review
Operation: /green/video/manual/asyncScan
This manual review operation does not return detection results in real time. You need to obtain the results through a callback or by polling. The detection results are retained for a maximum of 30 days.
-
Billing information:
This is a paid API operation. For more information about billing, see Content Moderation Pricing.
-
Return results:
The time required to return manual review results depends on the amount of data to be reviewed.
-
Obtaining review results using a callback: When you submit a manual review task, include the callback parameter in the request parameters to automatically receive the review results. For more information, see Request parameters.
-
Polling to retrieve review results: When you submit a manual review task, you do not need to pass the callback parameter. After you submit the task, call the result query API to retrieve the detection results. For more information, see Result Query API.
-
-
Video file requirements:
-
The video file URL must use the HTTP or HTTPS protocol.
-
The video file must be in one of the following formats: AVI, FLV, MP4, MPG, ASF, WMV, MOV, WMA, RMVB, RM, FLASH, or TS.
-
The size of a single video cannot exceed 200 MB.
-
Make sure that the storage service where the video files are stored is stable and reliable. We recommend that you use Alibaba Cloud Object Storage Service (OSS) to store your video files.
-
For more information about how to use this operation, see Connect to the manual review service.
QPS limit
The queries per second (QPS) limit for this API is 50 per user. Exceeding this limit triggers throttling, which can impact your business. Plan your calls accordingly.
Request parameters (Manual review)
For more information about the common request parameters that must be included in a request, see Common parameters.
The request body is a JSON struct that contains the following fields:
|
Name |
Type |
Required |
Example |
Description |
|
callback |
String |
No |
http://www.aliyundoc.com |
The
Note
After your callback server receives a result notification, it must return an HTTP status code of 200 to indicate success. Any other status code is treated as a failure. If the notification fails, Content Moderation retries up to 16 times until it succeeds. If it still fails after 16 retries, no more attempts are made. We recommend that you check the status of your callback endpoint. |
|
seed |
String |
Yes |
seedxxx |
A random string used for the signature in the callback notification request. The string can contain letters, digits, and underscores (_), and must be 64 characters or less. Customize this string to verify the origin of callback requests. Note
This parameter is required when you use a callback. |
|
tasks |
JSONArray |
No |
Specifies the detection objects. Each element in the JSON array is a detection task struct. You can specify a maximum of 100 elements to submit up to 100 content items for detection in a single request. To support the maximum of 100 elements, you must set the number of concurrent tasks to 100 or more. For a detailed description of the structure of each element, see task. |
|
Name |
Type |
Required |
Example |
Description |
|
url |
String |
Yes |
http://www.aliyundoc.com/xxx.mp4 |
The URL of the object to detect.
|
|
dataId |
String |
No |
dataIdxxxx |
The data ID of the detection object. This ID can contain uppercase and lowercase letters, digits, underscores (_), hyphens (-), and periods (.), and must be 128 characters or less. Use it to uniquely identify your business data. |
Returned data (manual review)
|
Name |
Type |
Example |
Description |
|
code |
Integer |
200 |
The error code. It is the same as the HTTP status code. For more information, see Common error codes. |
|
data |
JSONArray |
The data body that is returned for the request. Each element in the array represents the result of a manual review task. For a detailed description of the structure of each element, see data. |
|
|
msg |
String |
OK |
The message returned for the request. |
|
requestId |
String |
6CB46796-65F0-4CB1-9C7A-D64CC3108436 |
The request ID. |
|
Name |
Type |
Example |
Description |
|
code |
Integer |
200 |
The error code. It is the same as the HTTP status code. For more information, see Common error codes. |
|
dataId |
String |
dataIdxxxx |
The data ID of the detection object. Note
If dataId was passed in the detection request, the same dataId is returned here. |
|
msg |
String |
OK |
The message returned for the detection task. |
|
taskId |
String |
vi3tGoJ2zb45O5dQ7GAg1c32-1tyzXJ |
The ID of the manual review task. You can use this ID to call the result query operation to query the result of the manual review task. |
|
url |
String |
http://www.aliyundoc.com/xxx.mp4 |
The URL of the object to detect.
|
Examples (Manual review)
Sample request
http(s)://[Endpoint]/green/video/manual/asyncScan
&<Common request parameters>
{
"seed": "seedxxx",
"callback": "http://www.aliyundoc.com",
"tasks": [{
"dataId": "dataIdxxxx",
"url": "http://www.aliyundoc.com/xxx.mp4"
}]
}
Sample success response
{
"code": 200,
"data": [{
"code": 200,
"dataId": "dataIdxxx",
"msg": "OK",
"taskId": "vi3tGoJ2zb45O5dQ7GAg1c32-1tyzXJ",
"url": "http://www.aliyundoc.com/xxx.mp4"
}],
"msg": "OK",
"requestId": "6CB46796-65F0-4CB1-9C7A-D64CC3108436"
}
Instructions for querying manual video review results
Operation: /green/video/manual/scan/results. Use this operation to query the results of a manual video review.
QPS limit
The queries per second (QPS) limit for this API is 50 per user. Exceeding this limit triggers throttling, which can impact your business. Plan your calls accordingly.
Request parameters (Result query)
|
Name |
Type |
Required |
Example |
Description |
|
body |
StringArray |
Yes |
["vi3tGoJ2zb45O5dQ7GAg1c32-1tyzXJ"] |
A list of taskId values for the detection tasks you want to query. The array can contain up to 100 elements. You can obtain the taskId from the response after you submit a detection task. |
Response parameters (Result query)
|
Name |
Type |
Example |
Description |
|
code |
Integer |
200 |
The error code. It is the same as the HTTP status code. For more information, see Common error codes. |
|
data |
JSONArray |
The data body that is returned for the request. Each element in the array represents the result of a manual video moderation task. For a detailed description of the structure of each element, see data. |
|
|
msg |
String |
OK |
The message returned for the request. |
|
requestId |
String |
96C587F7-1A3F-40C3-ABA0-C967E41A80E2 |
The request ID. |
|
Name |
Type |
Example |
Description |
|
code |
Integer |
200 |
The error code. It is the same as the HTTP status code. For more information, see Common error codes. |
|
dataId |
String |
dataIdxxxx |
The data ID of the detection object. Note
If dataId was passed in the detection request, the same dataId is returned here. |
|
msg |
String |
OK |
The message returned for the detection task. |
|
suggestion |
String |
pass |
The recommended subsequent operation. Valid values:
|
|
taskId |
String |
vi3tGoJ2zb45O5dQ7GAg1c32-1tyzXJ |
The task ID. |
|
url |
String |
http://www.aliyundoc.com/xxx.mp4 |
The URL of the object to detect.
|
Examples (Result query)
Sample request
http(s)://[Endpoint]/green/video/manual/scan/results
&<Common request parameters>
[
"vi3tGoJ2zb45O5dQ7GAg1c32-1tyzXJ"
]
Sample success response
{
"code": 200,
"data": [{
"code": 200,
"dataId": "dataIdxxx",
"msg": "OK",
"suggestion": "pass",
"taskId": "vi3tGoJ2zb45O5dQ7GAg1c32-1tyzXJ",
"url": "http://www.aliyundoc.com/xxx.mp4"
}],
"msg": "OK",
"requestId": "96C587F7-1A3F-40C3-ABA0-C967E41A80E2"
}