Domain name for API request: vm.tencentcloudapi.com.
This API is used to poll the details of the detection result.
Default API request rate limit: 200 requests/sec.
A maximum of 200 requests can be initiated per second for this API.
The following request parameter list only provides API request parameters and some common parameters. For the complete common parameter list, see Common Request Parameters.
This document describes the parameters for Signature V1. It's recommended to use the V3 signature, which provides higher security. Note that for Signature V3, the common parameters need to be placed in the HTTP Header. See details.
Parameter Name | Required | Type | Description |
---|---|---|---|
Action | Yes | String | Common parameter. The value used for this API: DescribeTaskDetail. |
Version | Yes | String | Common parameter. The value used for this API: 2020-12-29. |
Region | No | String | Common parameter. This parameter is not required for this API. |
TaskId | Yes | String | This field indicates the task ID (in the Results parameter) returned after a video moderation task is created. It is used to identify the moderation task for which to query the details.Note: the query API can query up to 20 tasks at a time. |
ShowAllSegments | No | Boolean | This boolean field indicates whether to display all video segments. Valid values: True (yes), False (display only video segments that hit the moderation rule). Default value: False. |
Parameter Name | Type | Description |
---|---|---|
TaskId | String | This field is used to return the task ID (in the Results parameter) after a video moderation task is created. It is used to identify the moderation task for which to query the details.Note: this field may return null, indicating that no valid values can be obtained. |
DataId | String | This field is used to return the data ID parameter passed in when the video moderation API is called for easier data identification and management. Note: this field may return null, indicating that no valid values can be obtained. |
BizType | String | This field is used to return the BizType parameter passed in when the video moderation API is called for easier data identification and management.Note: this field may return null, indicating that no valid values can be obtained. |
Name | String | This field is used to return the task name in the TaskInput parameter passed in when the video moderation API is called for easier task identification and management.Note: this field may return null, indicating that no valid values can be obtained. |
Status | String | This field is used to return the task status of the queried content. Valid values: FINISH (task completed), PENDING (task pending), RUNNING (task in progress), ERROR (task error), CANCELLED (task canceled). Note: this field may return null, indicating that no valid values can be obtained. |
Type | String | This field is used to return the video moderation type passed in when the video moderation API is called. Valid values: VIDEO (video on demand), LIVE_VIDEO (video live streaming). Default value: VIDEO. Note: this field may return null, indicating that no valid values can be obtained. |
Suggestion | String | This field is used to return the operation suggestion for the maliciousness tag. When you get the determination result, the returned value indicates the operation suggested by the system. We recommend you handle different types of violations and suggestions according to your business needs. Returned values: Block, Review, Pass. Note: this field may return null, indicating that no valid values can be obtained. |
Labels | Array of TaskLabel | This field is used to return the maliciousness tag in the detection result. Returned values: Normal: normal; Porn: pornographic; Abuse: abusive; Ad: advertising; Custom: custom type of non-compliant content and other offensive, unsafe, or inappropriate types of content. Note: this field may return null, indicating that no valid values can be obtained. |
MediaInfo | MediaInfo | This field is used to return the details of the input media file, including encoding/decoding formats and segment length. For details, see the description of the MediaInfo data structure.Note: this field may return null, indicating that no valid values can be obtained. |
InputInfo | InputInfo | This field is used to return the media content information of the moderation service, mainly including the input file type and access URL. Note: this field may return null, indicating that no valid values can be obtained. |
CreatedAt | String | This field is used to return the creation time of the queried task in ISO 8601 format. Note: this field may return null, indicating that no valid values can be obtained. |
UpdatedAt | String | This field is used to return the last update time of the queried task in ISO 8601 format. Note: this field may return null, indicating that no valid values can be obtained. |
ImageSegments | Array of ImageSegments | This field is used to return the moderation result of the frames captured from the video. For the detailed returned content, see the description of the ImageSegments data structure.Note: the data is valid for 24 hours. To extend the storage period, set it in the configured COS bucket. Note: this field may return null, indicating that no valid values can be obtained. |
AudioSegments | Array of AudioSegments | This field is used to return the moderation result of the audio in the video. For the detailed returned content, see the description of the AudioSegments data structure.Note: the data is valid for 24 hours. To extend the storage period, set it in the configured COS bucket. Note: this field may return null, indicating that no valid values can be obtained. |
ErrorType | String | When the task status is Error , the type of the error will be returned. Valid values: DECODE_ERROR: decoding failed (the input resource may contain video that cannot be decoded).URL_ERROR: download address verification failed. TIMEOUT_ERROR: processing timed out. When the task status is not Error , null will be returned by default.Note: this field may return null, indicating that no valid values can be obtained. |
ErrorDescription | String | If the task status is Error , this field will return the error message; otherwise, null will be returned by default.Note: this field may return null, indicating that no valid values can be obtained. |
RequestId | String | The unique request ID, which is returned for each request. RequestId is required for locating a problem. |
This example shows you how to view the details of a task by TaskId
.
POST / HTTP/1.1
Host: vm.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: DescribeTaskDetail
<Common request parameters>
{
"TaskId": "task-video-XwxJtbkKXWgCt8AZ"
}
{
"Response": {
"TaskId": "task-video-XwxJtbkKXWgCt8AZ",
"DataId": "data_test_01",
"BizType": "1001",
"Name": "",
"Status": "FINISH",
"Type": "VIDEO",
"Suggestion": "Block",
"Labels": [
{
"Label": "Porn",
"Suggestion": "Block",
"Score": 99
},
{
"Label": "Hot",
"Suggestion": "Block",
"Score": 70
}
],
"MediaInfo": {
"Duration": 36
},
"InputInfo": {
"Type": "URL",
"Url": "https://cms-video-segments-1256309736.cos.ap-guangzhou.myqcloud.co/huang.mp4",
"BucketInfo": null
},
"CreatedAt": "2020-07-13T11:47:01.925Z",
"UpdatedAt": "2020-07-13T11:47:25.840Z",
"ImageSegments": [
{
"Result": {
"HitFlag": 1,
"Label": "Porn",
"Suggestion": "Block",
"Score": 85,
"Results": [
{
"Scene": "Porn",
"HitFlag": 1,
"Suggestion": "Block",
"Label": "Porn",
"SubLabel": "",
"Score": 85,
"Names": [],
"Text": "",
"Details": []
}
],
"Url": "https://cos.ap-zhou.myqcloud.com/c019/image_1.jpg"
},
"OffsetTime": "1"
},
{
"Result": {
"HitFlag": 1,
"Label": "Porn",
"Suggestion": "Block",
"Score": 77,
"Results": [
{
"Scene": "Porn",
"HitFlag": 1,
"Suggestion": "Block",
"Label": "Porn",
"SubLabel": "",
"Score": 77,
"Names": [],
"Text": "",
"Details": []
}
],
"Url": "https://cos.ap-guau.myqcloud.com/cc49b5b90a5d6802b7c019/image_2.jpg"
},
"OffsetTime": "2"
}
],
"AudioSegments": [
{
"Result": {
"HitFlag": 0,
"Label": "Normal",
"Suggestion": "Pass",
"Score": 0,
"Text": "Test audio text",
"Url": "https://xxx.com/7c019/audio_0.mp3",
"Duration": "36398"
},
"OffsetTime": "0"
}
],
"RequestId": "8d3e4765-48db-40b5-8fdb-aaf1d7225a60",
"ErrorType": "",
"ErrorDescription": ""
}
}
TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.
The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.
Error Code | Description |
---|---|
DryRunOperation | DryRun Operation. It means that the request would have succeeded, but the DryRun parameter was used. |
FailedOperation | The operation failed. |
InternalError | An internal error occurred. |
InvalidParameter | The parameter is incorrect. |
InvalidParameterValue | The parameter value is incorrect. |
LimitExceeded | The quota limit is exceeded. |
MissingParameter | The parameter is missing. |
OperationDenied | The operation was denied. |
RequestLimitExceeded | The number of requests exceeds the frequency limit. |
ResourceInUse | The resource is in use. |
ResourceInsufficient | The resource is insufficient. |
ResourceNotFound | The resource does not exist. |
ResourceUnavailable | The resource is unavailable. |
ResourcesSoldOut | The resources have been sold out. |
UnauthorizedOperation | The operation is unauthorized. |
UnknownParameter | The parameter is unknown. |
UnsupportedOperation | The operation is not supported. |
本页内容是否解决了您的问题?