tencent cloud

APIs

문서APIsVideo on DemandAI Generation APIsCreateAigcAdvancedCustomElement

CreateAigcAdvancedCustomElement

다운로드
포커스 모드
폰트 크기
마지막 업데이트 시간: 2026-09-18 16:51:14

1. API Description

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

This API is used to create an AIGC advanced custom 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. For customers who activate on-demand services from December 25, 2023, this field must be set to the app ID when accessing resources in on-demand applications, whether in the default application or a newly created application.

ElementName No String

Subject name, cannot exceed 20 characters.

ElementDescription No String

Subject description, up to 100 characters.

ReferenceType No String

Subject reference method. The availability of subjects customized via video and via image is different.

Enumeration values:

  • video_refer: Video role subject. At this point, refer to element_video_list to define the subject appearance.
  • image_refer: Multi-image subject. At this point, refer to element_image_list to define the subject appearance.
ElementVoiceId No String

Entity voice type, can bind existing timbres in the timbre library.

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

Entity reference video, used to set the entity and its details through video.

  • Videos with audio can be uploaded. If the video contains voice, it triggers custom timbre (customize + add to timbre library + bind with entity).
  • Required when referencing a video, unavailable when referencing an image.
  • Carried in key:value format, as follows:
    {  "refer_videos":[    {      "video_url":"video_url_1"    }  ]}
    ● Only MP4/MOV video formats are supported.
    ● Only 1080P videos with a duration between 3s and 8s and an aspect ratio of 16:9 or 9:16 are supported.
    ● Up to 1 video can be uploaded, with a video size no more than 200MB.
    ● The video_url parameter value cannot be empty.
ElementImageList No String

Subject reference image. You can set the subject and its details through multiple images.

  • Including a front reference image and other angle or close-up reference images. Among them:
    • At least 1 front reference image, defined by the frontal_image parameter.
    • 1–3 other reference images, which must differ from the front reference image, defined by the image_url parameter.
  • Use key:value to carry them, 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 principal. A principal can be configured with multiple tags.

  • Use key:value to carry them. Among them, details are given below:

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

DisableModeration No String

If the overseas custom subject library is enabled, you can pass in True to use it.

Enumeration values:

  • True: Use the overseas custom subject library.
  • False: Do not use the overseas custom subject library.
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 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 range is from -10 to 10. If this is not specified, the default value is 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 Main Body

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 Duplicate recognition code. Request deduplicated.
InvalidParameterValue.SessionIdTooLong SessionId is too long.
InvalidParameterValue.SubAppId Parameter value error: app ID.
UnauthorizedOperation Unauthorized operation.

도움말 및 지원

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

피드백