Modifies an AI template.

Description

After you call the AddAITemplate to add an AI template, you can call the UpdateAITemplate operation to modify the AI template.

QPS limit

You can call this operation up to five times per second per account. If the number of calls per second exceeds the limit, throttling is triggered. As a result, your business can be affected. We recommend that you take note of the limit when you call this operation. For more information, see QPS limits on API operations in ApsaraVideo VOD.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes UpdateAITemplate

The operation that you want to perform. Set the value to UpdateAITemplate.

TemplateId String Yes 1706a0063dd733f6a823ef32e0a5****

The ID of the AI template. You can use one of the following methods to obtain the ID of the AI template:

  • Call the AddAITemplate operation to add an AI template if no AI template exists. The value of TemplateId from the response is the ID of the AI template.
  • Call the ListAITemplate operation if the template already exists. The value of TemplateId from the response is the ID of the AI template.
TemplateName String Yes DemoAITemplate

The name of the AI template. The name can be up to 128 bytes in length.

TemplateConfig String Yes {"AuditItem":["terrorism","porn"],"AuditRange":["text-title","video"],"AuditContent":["screen"],"AuditAutoBlock":"yes"}

The detailed configurations of the AI template. The value is a JSON string.

Response parameters

Parameter Type Example Description
TemplateId String 1706a0063dd733f6a823ef32e0a5****

The ID of the template.

RequestId String 25818875-5F78-4A13-BEF6-****

The ID of the request.

Examples

Sample requests

http(s)://vod.cn-shanghai.aliyuncs.com/?Action=UpdateAITemplate
&TemplateId=1706a0063dd733f6a823ef32e0a5****
&TemplateName=DemoAITemplate
&TemplateConfig={"AuditItem":["terrorism","porn"],"AuditRange":["text-title","video"],"AuditContent":["screen"],"AuditAutoBlock":"yes"}
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<UpdateAITemplateResponse>
    <TemplateId>1706a0063dd733f6a823ef32e0a5****</TemplateId>
    <RequestId>25818875-5F78-4A13-BEF6-****</RequestId>
</UpdateAITemplateResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "TemplateId" : "1706a0063dd733f6a823ef32e0a5****",
  "RequestId" : "25818875-5F78-4A13-BEF6-****"
}

Error codes

For a list of error codes, visit the API Error Center.