tencent cloud

APIs

CreateContentReviewTemplate

Download
Modo Foco
Tamanho da Fonte
Última atualização: 2026-05-19 15:02:46

1. API Description

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.

We recommend you to use API Explorer
Try it
API Explorer provides a range of capabilities, including online call, signature authentication, SDK code generation, and API quick search. It enables you to view the request, response, and auto-generated examples.

2. Input Parameters

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).
  • ON: yes
  • OFF: No.
  • 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:
  • Abuse;
  • Drug-related violation.
  • 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.

    3. Output Parameters

    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.

    4. Example

    Example1 Creating a Content Moderation Template to Detect Pornographic Content, and Specifying the Threshold and Frame Interception Interval

    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.

    Input Example

    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
    }
    

    Output Example

    {
        "Response": {
            "Definition": 31,
            "RequestId": "97aee3e9-2qd3-4151-9d4b-9730a45227a9"
        }
    }
    

    Example2 Creating a Content Moderation Template to Detect Pornographic Content

    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.

    Input Example

    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"
    }
    

    Output Example

    {
        "Response": {
            "Definition": 30,
            "RequestId": "12ae8d8e-dce3-4151-9d4b-5594145287e1"
        }
    }
    

    Example3 Creating an Intelligent Auditing Template to Enable Multiple Recognition Tasks

    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.

    Input Example

    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
        }
    }
    

    Output Example

    {
        "Response": {
            "Definition": 32,
            "RequestId": "88aee3e9-2qd3-4151-9d4b-4390a45227a9"
        }
    }
    

    Example4 Creating a Content Moderation Template for Offensive Visual Content with Specified Filter Tags

    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.

    Input Example

    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"
    }
    

    Output Example

    {
        "Response": {
            "Definition": 33,
            "RequestId": "67aee3e9-2qd3-2395-9d4b-4390a96837a7"
        }
    }
    

    5. Developer Resources

    SDK

    TencentCloud API 3.0 integrates SDKs that support various programming languages to make it easier for you to call APIs.

    Command Line Interface

    6. Error Code

    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.

    Ajuda e Suporte

    Esta página foi útil?

    comentários