Skip to main content

Generate Video

POST /v1/platform/video

Submit an AI video generation task. Supports text-to-video, image-to-video, video continuation and more. Tasks execute asynchronously, returns task_id. Poll for results via the Query Task API

⚠️ File URLs generated by this API are only retained for 7 days. Please download and save them promptly.

⚠️ The video API parameters are highly similar to the image API. The main difference is: model must start with video-; each item in inputs adds category, reference_type and other video-specific fields; output adds duration, audio_generation and other fields.

Request Parameters​

ParameterTypeRequiredDescription
modelstringRequiredModel identifier, must start with video-. Format: video-{model_name}-{version}, e.g. video-kling-2.1.
promptstringRequiredText description for video generation. Describe scene content, actions, style, etc.
negative_promptstringOptionalNegative prompt describing content you don't want in the video.
enhance_promptstringOptionalWhether to enable automatic prompt enhancement.
可选值:enabled / disabled
generation_modestringOptionalGeneration mode, e.g. text-to-video, image-to-video. Available values depend on the model.
inputsarrayOptionalList of input files. Can include reference images, reference videos, or tail frame images.
↳ inputs[i] child fields
subject_inputsarrayOptionalList of subject reference images for consistent character generation (supported by Kling / Vidu).
↳ subject_inputs[i] child fields
outputobjectOptionalOutput configuration controlling video duration, audio, resolution, etc.
↳ output child fields (includes all image API fields; below are video-specific additions)
scene_typestringOptionalScene type for generation optimization in specific scenarios:
• Kling:motion_control(motion control)、avatar_i2v(digital human)、lip_sync(lip sync)
• Vidu:template_effect(special effects template)
input_regionstringOptionalSource region of input material.
可选值:mainland / oversea
session_idstringOptionalDeduplication identifier. If a request with the same session_id was made within 3 days, this request returns an error. Max 50 characters. Leave empty to skip deduplication.
session_contextstringOptionalSource context for passing user request info. The field value is returned in task callbacks. Max 1000 characters.
ext_infoobjectOptionalReserved field for special purposes. The specific format is determined by the model used.
inputs[i] child fields
Field NameTypeRequiredDescription
urlstringRequiredPublicly accessible URL of the input material. Recommend images under 10 MB. Supported formats: jpeg, jpg, png.
categorystringOptionalFile category.
可选值:image / video
reference_typestringOptionalReference type. GV model: asset (material reference), style (style reference). Kling model when category is video: feature (feature reference video), base (video to be edited).
object_idstringOptionalSubject ID, applicable to Vidu-q2 model. Fill in when identifying a subject in the image; can be referenced via @subjectID. Valid when category is image.
voice_idstringOptionalVoice ID, applicable to Vidu-q2 model. When all images carry a subject ID, you can assign a voice to each subject. Valid when category is image.
keep_original_soundstringOptionalWhether to preserve the original audio track of the input video. Valid when category is video.
可选值:enabled / disabled
usagestringOptionalPurpose of the input file, used to distinguish first-frame, last-frame, or reference generation. Default: reference.
可选值:firstFrame / reference / lastFrame
firstFrame: first frame for first/last-frame video or image-to-video; reference: reference-guided video; lastFrame: last frame for first/last-frame video.
textstringOptionalSubject name, only valid for PixVerse multi-image (subject) reference mode. Referenced in the Prompt via @Text, e.g. @cat running.
subject_inputs[i] child fields
Field NameTypeRequiredDescription
urlstringRequiredPublicly accessible URL of the subject reference image.
idstringOptionalFixed subject ID. Kling: Required; Vidu: Optional.
namestringOptionalFixed subject name. Vidu: Required; Kling: Optional.
output child fields (includes all image API fields; below are video-specific additions)
Field NameTypeRequiredDescription
durationintegerOptionalDuration of the generated video in seconds. Available values per model:
• Kling:5、10,Default 5
• Hailuo:6、10,Default 6
• Vidu:1~10
• GV:8,Default 8
• OS:4、8、12,Default 8
resolutionstringOptionalResolution of the generated video. Available values per model:
• Kling:720P、1080P,Default 720P
• Hailuo:768P、1080P,Default 768P
• Vidu:720P、1080P,Default 720P
• GV:720P、1080P,Default 720P
• OS:720P
aspect_ratiostringOptionalSpecify the aspect ratio of the generated video. Available values per model:
• Kling (text-to-video): 16:9、9:16、1:1,Default 16:9
• Vidu (text-to-video / reference image): 16:9、9:16、4:3、3:4、1:1 (q2 only supports 4:3, 3:4)
• GV:16:9、9:16,Default 16:9
• OS (text-to-video): 16:9、9:16,Default 16:9
• Hailuo:Not supported yet
audio_generationstringOptionalWhether to generate audio. Supported models:GV、OS、Vidu。Default: disabled. Equivalent to the boolean audio field; this field takes priority.
可选值:enabled / disabled
audiobooleanOptionalaudio_generation Shorthand for audio_generation. Setting true is equivalent to "enabled". Ignored if audio_generation is already set.
enhance_switchstringOptionalWhether to enable video enhancement. When the selected resolution exceeds the model's native capability, enhancement is enabled by default. You may output at lower resolution and apply enhancement to achieve higher resolution.
可选值:enabled / disabled
frame_interpolatestringOptionalWhether to enable Vidu smart frame interpolation for smoother video. Currently only supports the Vidu model.
可选值:enabled / disabled
media_namestringOptionalOutput media filename, max 64 characters. Defaults to a system-generated filename.
class_idintegerOptionalCategory ID for media classification management. Default: 0 (other).

Request Example​

JSON (Text-to-Video)
{
"model": "video-jimeng-3.0pro",
"prompt": "A cat running on the beach, golden sunset, slow motion",
"enhance_prompt": "enabled",
"output": {
"duration": 5,
"aspect_ratio": "16:9",
"audio_generation": "enabled",
"frame_interpolate":"enabled",

}
}
JSON (Image-to-Video with head/tail frames)
{
"model": "video-kling-2.1",
"prompt": "Camera slowly zooms in, flowers gently swaying in the breeze",
"inputs": [
{
"url": "https://example.com/first-frame.jpg",
"category":"image"
},
{
"url": "https://example.com/last-frame.jpg",
"category":"last_frame"
}
],
"output": {
"duration": 5,
"aspect_ratio": "16:9"
}
}

Response Parameters​

Field NameTypeDescription
task_idstringUnique task ID for subsequent task status queries.
statusstringInitial task status, usually queued.