Domain name for API request: vod.intl.tencentcloudapi.com.
This API is no longer maintained. The new version of the moderation template supports video moderation and image moderation. For details, please see Create Moderation Template.
This API is used to create a user-customized audio/video moderation template. Up to 50 templates can be created.
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 | Whether audio/video moderation results enter the audio/video moderation wall (for manual review of recognition results). |
| SubAppId | No | Integer | VOD application ID. For customers who activate VOD services after December 25, 2023, this field must be set to the app ID when accessing resources in VOD applications, whether in the default application or a newly created application. |
| 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. Restricted content includes: |
| UserDefineConfigure | No | UserDefineConfigureInfo | User-defined content review control parameters. |
| ScreenshotInterval | No | Float | Frame interception interval in seconds. If not specified, 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 pornographic content in images, with the thresholds for rule violation and manual recognition 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 the picture content pornography detection task, with the filter tags specified as porn and sexy, and the score thresholds for identifying violations and requiring 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 create a template ID. |
| InvalidParameterValue.BlockConfidence | Incorrect parameter value: the BlockConfidence parameter value is invalid. |
| InvalidParameterValue.Comment | Parameter error: description of this template. |
| InvalidParameterValue.LabelSet | Incorrect parameter value: the LabelSet parameter value is invalid. |
| InvalidParameterValue.Name | Parameter value error: Name exceeds the length limit. |
| InvalidParameterValue.ReviewConfidence | Incorrect parameter value: the ReviewConfidence parameter value is invalid. |
| InvalidParameterValue.ReviewWallSwitch | Incorrect parameter value: the ReviewWallSwitch parameter value is invalid. |
| InvalidParameterValue.ScreenshotInterval | Incorrect parameter value: the ScreenshotInterval parameter value is invalid. |
| InvalidParameterValue.Switch | Parameter value error: invalid Switch parameter value. |
| LimitExceeded.TooMuchTemplate | Exceed the limit: The number of templates exceeds the upper limit of 100. If needed, submit a ticket (https://console.tencentcloud.com/workorder/category). |
| UnauthorizedOperation | Unauthorized operation. |
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan