Docs Tencent AIGC /tencent-vod/v1/aigc-video
API reference

AIGC raw video

Tencent Cloud on-demand video generation. Official document: https://cloud.tencent.com/document/product/266/126240

POST/tencent-vod/v1/aigc-video

Body Parametersapplication/json

enhance_prompt string

Whether to automatically optimize prompt words. When turned on, incoming prompts will be automatically optimized to improve build quality. The values are: Enabled: turned on; Disabled: closed; Example value: Enabled

ext_info object

Reserved fields, used for special purposes. Example value: myextinfo

properties
AdditionalParameters object

Additional parameters

file_infos array

A list of up to three asset images describing the asset images to be used by the model when generating the video. Models that support multi-image input: 1. GV, when using multi-image input, LastFrameFileId and LastFrameUrl cannot be used. 2. Vidu supports multi-image reference videos. Pictures 1-7 of the q2 model can be passed in through the ObjectId in FileInfos as the subject id. Note: 1. The image size should not exceed 10M. 2. Supported image formats: jpeg, png.

items
object object
last_frame_url string

The media file URL used to generate the video as the end frame. Description: 1. Only models GV, Kling, and Vidu are supported. Other models are not supported yet. When ModelName is GV, if this parameter is specified, FileInfos must also be specified as the first frame of the video to be generated. This parameter can only be specified when the ModelName is Kling, the ModelVersion is 2.1 and the specified output resolution is 1080P. This parameter can be specified only when ModelName is Vidu and ModelVersion is q2-pro or q2-turbo. 2. The image size must be less than 5M. 3. 3. The value of the image format is: jpeg, jpg, png, webp. Example value: https://test.com/1.png

model_name* string

Model name. Value: Hailuo: conch; Kling: Keling; Vidu; Example value: GV

model_version* string

model version. Value: When ModelName is Hailuo, the optional values are 02, 2.3, 2.3-fast; When ModelName is Kling, the optional values are 1.6, 2.0, 2.1, 2.5, O1, 3.0, 3.0-Omni; When ModelName is Vidu, the optional values are q2, q2-pro, q2-turbo, q3-pro, q3-turbo; Example value: 2.3

negative_prompt string

Prompt word to prevent the model from generating videos. Example value: red

output_config object

Output media file configuration for video generation tasks.

properties
aspect_ratio string

Specifies the aspect ratio of the generated video. When ModelName is Kling and Vincent video is used, the optional values are 16:9, 9:16, 1:1, and the default is 16:9; When ModelName is Vidu, when generating videos and using reference images, the optional values are 16:9, 9:16, 4:3, 3:4, and 1:1. Only version q2 supports 4:3 and 3:4. When ModelName is Hailuo, it is not supported yet. Example value: 16:9

audio_generation string

Whether to generate audio. Supported models include GV, OS. The values are: Enabled: turned on; Disabled: closed; Default value: Disabled Example value: Enabled

duration number

The duration of the generated video, unit: seconds. When ModelName is Kling, the optional values are 5 and 10, and the default is 5; When ModelName is Kling and ModelVersion is 3.0 or 3.0-Omni, optional values are 3-15, default 5 When ModelName is Kling and ModelVersion is 3.0 - the file passed in by Omni is classified as Video, the optional value is 3-10, the default is 5 When ModelName is Hailuo, the optional values are 6 and 10, and the default is 6; When ModelName is Vidu, 1-10 can be specified; Example value: 8.0

input_compliance_check string

Whether to enable compliance checking of input content. The values are: Enabled: turned on; Disabled: closed; Example value: Enabled

output_compliance_check string

Whether to enable compliance checking of output content. The values are: Enabled: turned on; Disabled: closed; Example value: Enabled

person_generation string

Whether to allow character or face generation. The values are: AllowAdult: Allows adults to be generated; Disallowed: It is prohibited to include people or faces in images; Example value: AllowAdult

resolution string

The resolution of the generated video. When ModelName is Kling, the optional values are 720P and 1080P, and the default is 720P; When ModelName is Hailuo, the optional values are 768P and 1080P, and the default is 768P; When ModelName is Vidu, the optional values are 720P and 1080P, and the default is 720P; Example value: 720P

storage_mode string

Storage mode. The values are: Permanent: Permanent storage, the generated image files will be stored in the cloud on demand, and the FileId can be obtained in the event notification; Temporary: Temporary storage. The generated image files will not be stored in the cloud on demand. The URL for temporary access can be obtained in the event notification; Default value: Temporary

prompt* string

prompt word

scene_type string

Scene type. The values are as follows: When ModelName is Kling: motion_control represents motion control; avatar_i2v represents digital person; lip_sync means lip sync; Other ModelNames are not supported yet. Example value: motion_control

session_context string

Source context, used to transparently transmit user request information. The audio and video quality regeneration completion callback will return the value of this field, with a maximum length of 1000 characters. Example value: mySessionContext

session_id string

The identification code used for deduplication. If there is a request for the same identification code within three days, this request will return an error. The maximum length is 50 characters, without or with an empty string to indicate no deduplication. Example value: mysession

tasks_priority integer

The priority of the task. The larger the value, the higher the priority. The value range is -10 to 10. If left blank, it means 0. Example value: 10

Responses

200 success application/json
response-200 object
400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example
1{
2"enhance_prompt": "Enabled",
3"model_name": "Kling",
4"model_version": "1.6",
5"negative_prompt": "模糊、抖动",
6"output_config": {
7"aspect_ratio": "16:9",
8"audio_generation": "Enabled",
9"duration": 8,
10"enhance_switch": "Enabled",
11"input_compliance_check": "Enabled",
12"media_name": "car-video",
13"output_compliance_check": "Enabled",
14"person_generation": "AllowAdult",
15"resolution": "1080P",
16"storage_mode": "Temporary"
17},
18"prompt": "一辆汽车在公路上行驶,阳光明媚"
19}
Code Sample cURL
1curl -X POST "https://api.digislash.com/tencent-vod/v1/aigc-video" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"enhance_prompt": "Enabled",
6"model_name": "Kling",
7"model_version": "1.6",
8"negative_prompt": "模糊、抖动",
9"output_config": {
10"aspect_ratio": "16:9",
11"audio_generation": "Enabled",
12"duration": 8,
13"enhance_switch": "Enabled",
14"input_compliance_check": "Enabled",
15"media_name": "car-video",
16"output_compliance_check": "Enabled",
17"person_generation": "AllowAdult",
18"resolution": "1080P",
19"storage_mode": "Temporary"
20},
21"prompt": "一辆汽车在公路上行驶,阳光明媚"
22}'
Response
1▼{
2▼"Response": {
3"RequestId": "req-example",
4"TaskId": "task-example"
5}
6}