tencent cloud

APIs

CreateAigcSubject

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

1. API Description

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

This API is used to create AIGC custom subjects (Vidu). Note that calling this API may incur fees. Refer to the billing documentation (https://www.tencentcloud.com/document/product/266/95125?from_cn_redirect=1#96b3b59a-f9e1-49e9-966a-bedb70a4bf12).

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: CreateAigcSubject.
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 filled with the app ID when accessing resources in on-demand applications (whether the default application or a newly created application).

SubjectName No String

Subject name.

SubjectImages.N No Array of String

Subject image. Upload at least 1 subject image. * Note 1: Support passing image URL (ensure it is accessible); * Note 2: Input limit of 3 images; * Note 3: Image format supports png, jpeg, jpg, webp; * Note 4: Image ratio must be less than 1:4 or 4:1; * Note 5: Image size no more than 50 MB;

SubjectVideos.N No Array of String

The video reference allows uploading 1 main video.

  • Note 1: Only the reference viduq2-pro model supports using the video subject.
  • Note 2: A maximum of 1 video of 5 seconds is supported.
  • Note 3: The video supports mp4, avi, or mov format.
  • Note 4: The video pixel cannot be less than 128*128, the ratio must be less than 1:4 or 4:1, and the size must be no more than 100M.
VoiceId No String

Voice type Id. This information is used when creating an audio and video direct output task.

  • Note 1: If no voice type Id is provided when generating an audio and video direct output task, the system will automatically recommend a voice type.
  • Note 2: Voice type Id cannot be used in q2-pro.
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 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 Video Content

Input Example

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

{
    "SubAppId": 221073,
    "SubjectName": "mySessionName",
    "SubjectVideos": [
        "***"
    ],
    "SessionContext": "mySessionContext",
    "TasksPriority": 10
}

Output Example

{
    "Response": {
        "TaskId": "221073-CreateAigcSubject-f9aa5a12**********cdd403de6fcd07t",
        "RequestId": "e78603c5-2fd1-417a-91f5-023728963868"
    }
}

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.

도움말 및 지원

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

피드백