Theme
Create Task
POST
https://www.kkiai.com/tencent-vod/v1/aigc-video
Official documentation: https://cloud.tencent.com/document/product/266/126240
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Header Parameters
| Parameter Name | Type | Required | Description | Example |
|---|---|---|---|---|
Authorization | string | Optional | Bearer {{YOUR_API_KEY}} | |
Content-Type | string | Optional | application/json |
Body Parameters (application/json)
| Parameter Name | Type | Required | Description |
|---|---|---|---|
model_name | string | Required | Model name. Values: Hailuo: Hailuo; Kling: Kling; Vidu; Example value: GV |
model_version | string | Required | Model version. Values: When ModelName is Hailuo, optional values are 02, 2.3, 2.3-fast; When ModelName is Kling, optional values are 1.6, 2.0, 2.1, 2.5, O1, 3.0, 3.0-Omni; When ModelName is Vidu, optional values are q2, q2-pro, q2-turbo, q3-pro, q3-turbo; Example value: 2.3 |
prompt | string | Required | |
negative_prompt | string | Optional | Prompt words to prevent the model from generating in the video. Example value: red |
enhance_prompt | string | Optional | Whether to automatically optimize the prompt. When enabled, the input Prompt will be automatically optimized to improve generation quality. Values: Enabled: Enable; Disabled: Disable; Example value: Enabled |
file_infos | array[object] | Optional | A list containing up to three material resource images used to describe the resource images the model should use when generating videos. Models supporting multi-image input: 1. GV, when using multi-image input, LastFrameFileId and LastFrameUrl cannot be used. 2. Vidu, supports multi-image reference for video generation. q2 model supports 1-7 images, and the ObjectId in FileInfos can be used to pass as the subject id. Note: 1. Image size should not exceed 10M. 2. Supported image formats: jpeg, png. |
└ type | string | Optional | Input video file type. Values: File: VOD media file; Url: Accessible URL; Example value: File |
└ category | string | Optional | File classification. Values: Image: Image; Video: Video. Example value: Image |
└ file_id | string | Optional | Media file ID of the image file, which is the globally unique identifier of the file on Cloud VOD. It is assigned by the Cloud VOD backend after successful upload. This field can be obtained from the video upload completion event notification or Cloud VOD console. This parameter is valid when Type is File. Note: 1. It is recommended to use images smaller than 7M; 2. Image format values are: jpeg, jpg, png, webp. Example value: 3704211***509819 |
└ url | string | Optional | Accessible file URL. This parameter is valid when Type is Url. Note: 1. It is recommended to use images smaller than 7M; 2. Image format values are: jpeg, jpg, png, webp. Example value: https://test.com/1.png |
└ text | string | Optional | Description information of the input image to help the model understand the image. Only valid for GEM 2.5 and GEM 3.0. Example value: Task background: This is the main building that needs renovation (Figure 1), and its geometric structure must not be changed. |
last_frame_url | string | Optional | Media file URL used as the last frame to generate video. Note: 1. Only supports models GV, Kling, and Vidu; other models are not currently supported. When ModelName is GV, if this parameter is specified, FileInfos must also be specified as the first frame of the video to be generated. When ModelName is Kling, ModelVersion is 2.1, and the output resolution Resolution is specified as 1080P, this parameter can be specified. When ModelName is Vidu, ModelVersion is q2-pro or q2-turbo, this parameter can be specified. 2. Image size should be less than 5M. 3. Image format values are: jpeg, jpg, png, webp. Example value: https://test.com/1.png |
output_config | object | Optional | Output media file configuration for video generation tasks. |
└ storage_mode | string | Optional | Storage mode. Values: Permanent: Permanent storage, generated image files will be stored in Cloud VOD and can be obtained in event notifications with FileId; Temporary: Temporary storage, generated image files will not be stored in Cloud VOD but can be obtained in event notifications with temporary access URLs; Default value: Temporary |
└ resolution | string | Optional | Resolution of the generated video. When ModelName is Kling, optional values are 720P, 1080P, default is 720P; When ModelName is Hailuo, optional values are 768P, 1080P, default is 768P; When ModelName is Vidu, optional values are 720P, 1080P, default is 720P; Example value: 720P |
└ aspect_ratio | string | Optional | Aspect ratio of the generated video. When ModelName is Kling, for text-to-video, optional values are 16:9, 9:16, 1:1, default is 16:9; When ModelName is Vidu, for text-to-video and reference image generation, optional values are 16:9, 9:16, 4:3, 3:4, 1:1, where only version q2 supports 4:3, 3:4; When ModelName is Hailuo, it is not currently supported. Example value: 16:9 |
└ audio_generation | string | Optional | Whether to generate audio. Supported models include GV and OS. Values: Enabled: Enable; Disabled: Disable; Default value: Disabled; Example value: Enabled |
└ duration | string | Optional | Duration of the generated video in seconds. When ModelName is Kling, optional values are 5, 10, default is 5; When ModelName is Kling and ModelVersion is 3.0 or 3.0-Omni, optional values are 3-15, default is 5; When ModelName is Kling and ModelVersion is 3.0-Omni and the input file classification is Video, optional values are 3-10, default is 5; When ModelName is Hailuo, optional values are 6, 10, default is 6; When ModelName is Vidu, you can specify 1-10; Example value: 8.0 |
└ person_generation | string | Optional | Whether to allow generation of people or faces. Values: AllowAdult: Allow generation of adults; Disallowed: Prohibit people or faces in images; Example value: AllowAdult |
└ input_compliance_check | string | Optional | Whether to enable compliance check for input content. Values: Enabled: Enable; Disabled: Disable; Example value: Enabled |
└ output_compliance_check | string | Optional | Whether to enable compliance check for output content. Values: Enabled: Enable; Disabled: Disable; Example value: Enabled |
scene_type | string | Optional | Scene type. Values are as follows: When ModelName is Kling: motion_control represents motion control; avatar_i2v represents digital human; lip_sync represents lip sync; Other ModelNames are not currently supported. Example value: motion_control |
session_id | string | Optional | Identification code for deduplication. If a request with the same identification code has been made within three days, this request will return an error. Maximum 50 characters. Empty or no value means no deduplication. Example value: mysession |
session_context | string | Optional | Source context for transparently passing user request information. The audio and video quality regeneration completion callback will return this field value. Maximum 1000 characters. Example value: mySessionContext |
tasks_priority | string | Optional | Task priority. The larger the value, the higher the priority. The value range is -10 to 10. If not filled, it represents 0. Example value: 10 |
ext_info | object | Optional | Reserved field for special purposes. Example value: myextinfo |
└ AdditionalParameters | object | Optional |
Request Example
json
{
"model_name": "Kling",
"model_version": "1.6",
"prompt": "A car is driving on the road under bright sunshine.",
"negative_prompt": "blurry, shaky",
"enhance_prompt": "Enabled",
"output_config": {
"storage_mode": "Temporary",
"media_name": "car-video",
"duration": 8,
"resolution": "1080P",
"aspect_ratio": "16:9",
"audio_generation": "Enabled",
"person_generation": "AllowAdult",
"input_compliance_check": "Enabled",
"output_compliance_check": "Enabled",
"enhance_switch": "Enabled"
}
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/tencent-vod/v1/aigc-video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model_name": "Kling",
"model_version": "1.6",
"prompt": "A car is driving on the road under bright sunshine.",
"negative_prompt": "blurry, shaky",
"enhance_prompt": "Enabled",
"output_config": {
"storage_mode": "Temporary",
"media_name": "car-video",
"duration": 8,
"resolution": "1080P",
"aspect_ratio": "16:9",
"audio_generation": "Enabled",
"person_generation": "AllowAdult",
"input_compliance_check": "Enabled",
"output_compliance_check": "Enabled",
"enhance_switch": "Enabled"
}
}'Response
🟢 200 Success
Response Example
json
{
"Response": {
"TaskId": "251007502-AigcImage***2782aff1e896673f1ft",
"RequestId": "f50d7667-72d8-46bb-a7e3-0613588971b6"
}
}