Adds an AI template for automated review and smart thumbnail tasks.
Description
Before you add an AI template for automated review and smart thumbnail tasks, make sure that automated review and smart thumbnail are enabled.
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
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | AddAITemplate |
The operation that you want to perform. Set the value to AddAITemplate. |
TemplateName | String | Yes | AI-media-test |
The name of the AI template. The name can be up to 128 bytes in length. |
TemplateType | String | Yes | AIMediaAudit |
The type of the AI template. Valid values:
|
TemplateConfig | String | Yes | {"AuditItem":["terrorism","porn"],"AuditRange":["image-cover","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 AI template. |
RequestId | String | 25818875-5F78-4A13-BEF6-**** |
The ID of the request. |
Examples
Sample requests
http(s)://vod.cn-shanghai.aliyuncs.com/?Action=AddAITemplate
&TemplateName=AI-media-test
&TemplateType=AIMediaAudit
&TemplateConfig={"AuditItem":["terrorism","porn"],"AuditRange":["image-cover","text-title","video"],"AuditContent":["screen"],"AuditAutoBlock":"yes"}
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<AddAITemplateResponse>
<TemplateId>1706a0063dd733f6a823ef32e0a5****</TemplateId>
<RequestId>25818875-5F78-4A13-BEF6-****</RequestId>
</AddAITemplateResponse>
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.