tencent cloud

APIs

CreateAigcVideoTask

下载
聚焦模式
字号
最后更新时间: 2026-07-07 15:00:35

1. API Description

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

This API is used to create AI video generation tasks.

A maximum of 10 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: CreateAigcVideoTask.
Version Yes String Common Params. The value used for this API: 2019-06-12.
Region No String Common Params. This parameter is not required.
ModelName No String

Model name.
Supported models:
Hunyuan.
Hailuo.
Kling.
Vidu.
PixVerse.
Mingmou.
H2.

ModelVersion No String

Specific version number of the model. By default, the system uses the supported stable version of the model.

  1. Hunyuan: [1.5].
  2. Hailuo: [02, 2.3, and 2.3-fast].
  3. Kling: [1.6, 2.0, 2.1, 2.5, O1, 2.6, 3.0, and 3.0-Omni].
  4. Vidu: [q2, q2-pro, q2-turbo, q3-pro, q3-turbo, q3, and q3-mix].
  5. PixVerse: [v5.6, v6, and c1].
  6. H2: [1.0].
SceneType No String

Scenario for the generated video.
Note: Not all models support scenarios.

  1. Kling supports: motion control (motion_control), digital human (avatar_i2v), and lip sync (lip_sync).
  2. Mingmou supports: landscape-to-portrait conversion (land2port).
  3. Vidu supports: effect templates (template_effect).
  4. Hunyuan supports: 3D world model (3d_scene). The returned file is not a video.
Prompt No String

Description of the generated video. This parameter is required when no image is specified.

NegativePrompt No String

Specifies the content you want to prevent the model from generating.
Note: Not all models support this.
For example:
Top lighting and bright colors.
People and animals.
Multiple vehicles and wind.

EnhancePrompt No Boolean

The default value is False, meaning the model follows instructions strictly.
For better results with more nuanced prompts, set this parameter to True to automatically optimize the input prompt and improve generation quality.

ImageUrl No String

Image URL used for video generation. The URL must be accessible from the public network.
Note:

  1. The recommended image size is no more than 10 MB. Different models have different size limits. See the model website for a more complete description.
  2. Supported image formats: JPEG and PNG.
LastImageUrl No String

The model will generate a video using the image of this parameter as the ending frame.
Models that support this parameter:

  1. Kling 2.0, O1, 3.0, and 3.0-Omni support starting and ending frames.
  2. Kling 1.6, 2.1, 2.5, and 2.6 support starting and ending frames with Resolution:1080p.
  3. Vidu q2-pro, q2-turbo, q3-pro, and q3-turbo support starting and ending frames.
  4. PixVerse v5.6, v6, and c1 support starting and ending frames.
  5. Hailuo 02 supports starting and ending frames.

Note:

  1. The recommended image size is no more than 10 MB. Different models have different limits.
  2. Supported image formats: JPEG and PNG.
ImageInfos.N No Array of AigcVideoReferenceImageInfo

List of multiple asset resource images used to describe the resource images used by the model for video generation.

Models that support multiple images:

  1. Vidu q2, q2-pro, q3-turbo, q3, and q3-mix support video generation with multiple reference images. One to 7 images can be uploaded. The ReferenceType in ImageInfos can be used to specify the subject ID for the input.
  2. Kling O1, 3.0-Omni, and 1.6 support video generation with multiple reference images.
    1. Kling 1.6 allows uploading 1 to 4 images.
    2. Kling O1 and 3.0-Omni allow uploading 1 to 7 images. If a reference video is present, 0 to 4 images can be uploaded.
  3. PixVerse, v5.6, v6, and c1 support video generation with multiple reference images. One to 7 images can be uploaded, and image names need to be specified via the Text field in ImageInfos.
  4. H2 1.0 supports video generation with multiple image parameters. One to 9 images can be uploaded. If a reference video is present, 0 to 5 images can be uploaded.

Note:

  1. The image size cannot exceed 10 MB.
  2. Supported image formats: JPEG and PNG.
VideoInfos.N No Array of AigcVideoReferenceVideoInfo

Only Kling O1, Kling 3.0-Omni, Vidu q2-pro, and H2 1.0 support reference video information.

  1. For Kling O1 and 3.0-Omni, the reference video can be used as a feature reference video or a video for editing. The default type is video for editing. You can choose to keep the original sound of the video.
  2. Vidu q2-pro supports video reference.
  3. H2 1.0 supports video reference.
Duration No Integer

Duration of the generated video.
Note:

  1. Kling: default value: 5 seconds.
    • O1 supports 3 to 10 seconds.
    • 3.0-Omni supports 3 to 15 seconds, or 3 to 10 seconds when a video reference is used.
    • 3.0 supports 3 to 15 seconds.
    • Other versions support 5 and 10 seconds.
  2. The std mode of Hailuo supports 6 and 10 seconds, and other modes support 6 seconds. Default value: 6 seconds.
  3. Vidu: default value: 5 seconds.
    • q3-pro, q3-turbo, q3, and q3-mix support 3 to 16 seconds.
    • q2-pro, q2-turbo, and q2 support 1 to 10 seconds.
  4. PixVerse: default value: 5 seconds.
    • v5.6 supports 5, 8, and 10 seconds.
    • v6 and c1 support 1 to 15 seconds.
  5. H2 supports 3 to 15 seconds. Default value: 5 seconds.
ExtraParameters No AigcVideoExtraParam

Additional parameters required.

StoreCosParam No AigcStoreCosParam

COS bucket information for the file result. Note: COS is required and the MPS_QcsRole role needs to be created and authorized.

AdditionalParameters No String

Special scenario parameters or storyboard prompts required by the model, formatted as a JSON serialized string.
Example:
{"camera_control":{"type":"simple"}}.

Operator No String

API operator name.

3. Output Parameters

Parameter Name Type Description
TaskId String

Returned task ID after the task is created successfully.
The task progress and generation results can be obtained by calling the query API.

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 Request Example

Input Example

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

{
    "ModelName": "Hunyuan",
    "Prompt": "move the picture",
    "NegativePrompt": "Top lighting,bright colors",
    "EnhancePrompt": false,
    "ImageUrl": "https://1500039689.vod-**.com/6cd2c44bvodcq1500039689/179cafb25145403699605999621/**oxE6jcA.png",
    "LastImageUrl": "https://aigc-**-image-1303333058.cos.ap-guangzhou.myqcloud.com/xxx_8655.png",
    "Duration": 5,
    "ExtraParameters": {
        "Resolution": "720P",
        "AspectRatio": "16:9"
    },
    "StoreCosParam": {
        "CosBucketName": "aigc-***-video-1**58",
        "CosBucketRegion": "ap-guangzhou",
        "CosBucketPath": "my_cos_file"
    },
    "Operator": "admin"
}

Output Example

{
    "Response": {
        "TaskId": "2147**3792",
        "RequestId": "643fb583-0032-44ac-bfa8-bef25e310998"
    }
}

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
InvalidParameter.ViolationContent Review blocklist for user-submitted input.

帮助和支持

本页内容是否解决了您的问题?

填写满意度调查问卷,共创更好文档体验。

文档反馈