Domain name for API request: vod.intl.tencentcloudapi.com.
We have stopped updating this API. Our new moderation templates can moderate audio/video as well as images. For details, see CreateReviewTemplate.
This API is used to create a custom audio/video moderation template. Up to 50 templates can be created in total.
A maximum of 10 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.
| Parameter Name | Required | Type | Description |
|---|---|---|---|
| Action | Yes | String | Common Params. The value used for this API: CreateContentReviewTemplate. |
| Version | Yes | String | Common Params. The value used for this API: 2018-07-17. |
| Region | No | String | Common Params. This parameter is not required. |
| ReviewWallSwitch | Yes | String | Switch for whether the audio/video moderation result enters the audio/video moderation wall (manual review of the recognition result). |
| SubAppId | No | Integer | VOD application ID. Customers who activate VOD services after December 25, 2023 must fill this field with the application ID when accessing resources in on-demand applications (whether default or newly created). |
| Name | No | String | Content review template name. Length limit: 64 characters. |
| Comment | No | String | Content review template description, with a length limit of 256 characters. |
| PornConfigure | No | PornConfigureInfo | Control parameters for offensive information. |
| TerrorismConfigure | No | TerrorismConfigureInfo | Control parameters for unsafe information. |
| PoliticalConfigure | No | PoliticalConfigureInfo | Uncomfortable control parameters. |
| ProhibitedConfigure | No | ProhibitedConfigureInfo | Prohibited control parameters. Prohibited content includes: |
| UserDefineConfigure | No | UserDefineConfigureInfo | User-defined content review control parameters. |
| ScreenshotInterval | No | Float | Frame interception interval in seconds. If left empty, the default frame interval is 1 second with a minimum value of 0.5 seconds. |
| Parameter Name | Type | Description |
|---|---|---|
| Definition | Integer | Unique identifier of an audio and video content review template. |
| RequestId | String | The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem. |
This example shows you how to create a custom AI content moderation template to detect offensive visual content, with the thresholds for picture violation and manual identification set to 80 and 30, respectively, and the frame interception interval set to 1 second.
POST / HTTP/1.1
Host: vod.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateContentReviewTemplate
<Common request parameters>
{
"Comment": "Template 2",
"PornConfigure": {
"ImgReviewInfo": {
"BlockConfidence": 80,
"Switch": "ON",
"ReviewConfidence": 30
}
},
"ReviewWallSwitch": "OFF",
"Name": "Content Moderation Template"
"ScreenshotInterval": 1
}
{
"Response": {
"Definition": 31,
"RequestId": "97aee3e9-2qd3-4151-9d4b-9730a45227a9"
}
}
This example shows you how to create a custom AI content moderation template to detect pornographic content in images using the default thresholds for rule violation and manual recognition, without specifying a filter tag.
POST / HTTP/1.1
Host: vod.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateContentReviewTemplate
<Common request parameters>
{
"Comment": "Template 1",
"PornConfigure": {
"ImgReviewInfo": {
"Switch": "ON"
}
},
"ReviewWallSwitch": "OFF",
"Name": "Content Moderation Template"
}
{
"Response": {
"Definition": 30,
"RequestId": "12ae8d8e-dce3-4151-9d4b-5594145287e1"
}
}
This example shows you how to create a custom AI content moderation template to detect pornographic, terrorist, and politically sensitive content in images using the default thresholds for rule violation and manual recognition, without specifying a filter tag.
POST / HTTP/1.1
Host: vod.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateContentReviewTemplate
<Common request parameters>
{
"Comment": "test template",
"PornConfigure": {
"ImgReviewInfo": {
"Switch": "ON"
}
},
"ReviewWallSwitch": "OFF",
"Name": "TestTemplate",
"PoliticalConfigure": {
"ImgReviewInfo": {
"Switch": "ON"
}
},
"TerrorismConfigure": {
"ImgReviewInfo": {
"Switch": "ON"
},
"OcrReviewInfo": null
}
}
{
"Response": {
"Definition": 32,
"RequestId": "88aee3e9-2qd3-4151-9d4b-4390a45227a9"
}
}
This example shows you how to create a custom AI content review template to enable a picture content pornography detection task, with the filter tags specified as porn and sexy, and the score thresholds for identifying violations and manual approval set to default.
POST / HTTP/1.1
Host: vod.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateContentReviewTemplate
<Common request parameters>
{
"Comment": "Template 1",
"PornConfigure": {
"ImgReviewInfo": {
"Switch": "ON",
"LabelSet": [
"sexy",
"porn"
]
}
},
"ReviewWallSwitch": "OFF",
"Name": "Content Moderation Module"
}
{
"Response": {
"Definition": 33,
"RequestId": "67aee3e9-2qd3-2395-9d4b-4390a96837a7"
}
}
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 |
|---|---|
| FailedOperation | Operation failed. |
| FailedOperation.InvalidVodUser | The VOD service is not activated. |
| InternalError | Internal error. |
| InternalError.GenDefinition | Internal error: failed to generate template ID. |
| InvalidParameterValue.BlockConfidence | Incorrect parameter value: the value of the BlockConfidence parameter is invalid. |
| InvalidParameterValue.Comment | Invalid parameter: template description. |
| InvalidParameterValue.LabelSet | Incorrect parameter value: the value of the LabelSet parameter is invalid. |
| InvalidParameterValue.Name | Incorrect parameter value: Name exceeds the length limit. |
| InvalidParameterValue.ReviewConfidence | Incorrect parameter value: the value of the ReviewConfidence parameter is invalid. |
| InvalidParameterValue.ReviewWallSwitch | Incorrect parameter value: the value of the ReviewWallSwitch parameter is invalid. |
| InvalidParameterValue.ScreenshotInterval | Incorrect parameter value: the value of the ScreenshotInterval parameter is invalid. |
| InvalidParameterValue.Switch | Incorrect parameter value: the value of the Switch parameter is invalid. |
| LimitExceeded.TooMuchTemplate | Limit exceeded: The number of templates exceeds the upper limit of 100. If you need more, pleaseSubmit a ticket. |
| UnauthorizedOperation | Unauthorized operation. |
Esta página foi útil?
Você também pode entrar em contato com a Equipe de vendas ou Enviar um tíquete em caso de ajuda.
comentários