tencent cloud

APIs

문서APIsVideo on DemandAI Generation APIsCreateAigcAdvancedCustomElement

CreateAigcAdvancedCustomElement

Download
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-05-19 15:03:14

1. API Description

Domain name for API request: vod.intl.tencentcloudapi.com.

This API is used to create an advanced custom AIGC subject.

A maximum of 20 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: CreateAigcAdvancedCustomElement.
Version Yes String Common Params. The value used for this API: 2018-07-17.
Region No String Common Params. This parameter is not required.
SubAppId No Integer

Video-on-demand (VOD) application ID. Customers who activate on-demand services from December 25, 2023 must fill this field with the app ID when accessing resources in on-demand applications (whether default or newly created application).

ElementName No String

Subject name cannot exceed 20 characters.

ElementDescription No String

Subject description, with a length limit of 100 characters.

ReferenceType No String

Reference method for the subject. The availability area differs between subjects customized via video and those customized via images.

Enumeration value:

  • video_refer: Video character subject. At this point, the subject appearance is defined by referring to element_video_list.
  • image_refer: Multi-image subject. At this point, the subject appearance is defined by referring to element_image_list.
ElementVoiceId No String

Voice type of the current entity. You can bind an existing timbre from the timbre library.

  • When the current parameter is empty, the current entity is not bound to a timbre.
  • Only customized video entities support binding a timbre.
ElementVideoList No String

Reference video for the entity. You can set the entity and its details through the video.

  • You can upload a video with sound. If the video contains voice, it will trigger timbre customization (customization + adding to the timbre library + binding to the entity).
  • The current parameter is required when referencing a video and is invalid when referencing an image.
  • Use key:value pairs as follows:
    {  "refer_videos":[    {      "video_url":"video_url_1"    }  ]}
    ● Only MP4/MOV video formats are supported.
    ● Only 1080p videos with a duration between 3s–8s and an aspect ratio of 16:9 or 9:16 are supported.
    ● Up to 1 video can be uploaded, with a video size of no more than 200MB.
    ● The video_url parameter value cannot be empty.
ElementImageList No String

Reference images of the subject can be set with multiple images and its details.

  • Including front reference images and other perspectives or close-up reference images. Among them:
    • At least 1 front reference image is required, defined by the frontal_image parameter.
    • 1–3 other reference images are required, with differences from the front reference image, defined by the image_url parameter.
  • Use key:value to carry, as follows:
    {  "frontal_image":"image_url_0",  "refer_images":[    {      "image_url":"image_url_1"    },    {      "image_url":"image_url_2"    },    {      "image_url":"image_url_3"    }  ]}
TagList No String

Configure tags for a subject. A subject can be configured with multiple tags.

  • Use key:value pairs to carry them. Details are given below:

[  {        "tag_id": "o_101"  }, {        "tag_id": "o_102"    }]

SessionId No String

Identifier for deduplication. If a request with the same identifier has been sent within the past three days, an error is returned for the current request. The maximum length is 50 characters. If this is not specified or left empty, deduplication is not performed.

SessionContext No String

Source context. This is used to pass through user request information. The task complete callback returns the value of this field. The maximum length is 1000 characters.

TasksPriority No Integer

Task priority. The higher the value, the higher the priority. The value ranges from -10 to 10. If this is not specified, it represents 0.

3. Output Parameters

Parameter Name Type Description
TaskId String

Task ID.

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 Multi-Image Subject

Input Example

POST / HTTP/1.1
Host: vod.intl.tencentcloudapi.com
Content-Type: application/json
X-TC-Action: CreateAigcAdvancedCustomElement
<Common request parameters>

{
    "SubAppId": 221073,
    "ElementName": "testname",
    "ElementDescription": "testdescription",
    "ReferenceType": "image_refer",
    "ElementVoiceId": "123333",
    "ElementImageList": "{\"frontal_image\":\"image_url_0\",\"refer_images\":[{\"image_url\":\"image_url_1\"},{\"image_url\":\"image_url_2\"},{\"image_url\":\"image_url_3\"}]}",
    "TagList": "[{\"tag_id\": \"o_101\"}, {\"tag_id\": \"o_102\"}]"
}

Output Example

{
    "Response": {
        "TaskId": "221073-CreateAigcAdvancedCustomElement-927af0f45e354127835f6ec67c48f2a9t",
        "RequestId": "2ff6980c-db91-488b-bb5b-04e8eb5661d2"
    }
}

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.
InvalidParameter Parameter error.
InvalidParameterValue.SessionContextTooLong SessionContext is too long.
InvalidParameterValue.SessionId The deduplication ID already exists. The request is removed due to duplication.
InvalidParameterValue.SessionIdTooLong SessionId is too long.
InvalidParameterValue.SubAppId Incorrect parameter value: application id.
UnauthorizedOperation Unauthorized operation.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백