Generate a video
generate_videoGenerate videos from text or image prompts with Pixmax models; control keyframes with start and end frames, and add motion or lip-sync via reference videos and audio.
Instructions
Generate a video with a Pixmax model (Kling V3/O1/2.6, Veo 3.1, Hailuo, Wan, PixVerse, Vidu, Seedance). Pass an image (path or URL) for image-to-video, plus last_frame for start+end keyframe control (the model interpolates between them — Seedance 2 and Hailuo). Seedance 2 (PIXDANCE_2 / _FAST / _MINI) additionally supports multimodal references — reference_videos (borrow motion/style from a clip) and reference_audio (drive speech/lip-sync); audio must be paired with an image or video reference. Other models take images only. Note: Veo 3.1 runs 8s; Hailuo runs 6s or 10s. Video can take a few minutes; set wait=false to get a task id and poll with get_task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Default true. false = return a task id immediately (poll with get_task) | |
| count | No | Number of clips (billed linearly) | |
| image | No | Local path or URL for image-to-video (the START / first frame) | |
| model | Yes | Model code or name, e.g. "KLING_V3" or "Veo 3.1" | |
| style | No | Visual-language suffix for consistency across clips | |
| prompt | Yes | ||
| save_to | No | Directory to save the .mp4 — Pixmax URLs expire | |
| duration | No | Seconds (model-dependent; Veo=8, Hailuo=6|10) | |
| last_frame | No | END frame (path or URL) — with `image` this becomes start+end keyframe control and the model interpolates between them. Known-supported on Seedance 2 and Hailuo. Requires `image` | |
| resolution | No | e.g. 480P, 720P, 1080P. Hailuo forces 768P (720P is illegal there) | |
| refer_model | No | Override the reference mode, e.g. "textToVideo", "imageToVideo", "imageRefer" (Vidu Q3 Mix requires imageRefer) | |
| aspect_ratio | No | e.g. 16:9, 9:16 | |
| include_audio | No | ||
| reference_audio | No | Seedance 2 only — reference audio (paths or URLs) to drive speech/lip-sync. MUST be paired with a reference image or video | |
| reference_images | No | Multiple reference images for i2v / reference-to-video (first = primary frame); rich objects add role/strength/note guidance | |
| reference_videos | No | Seedance 2 only — reference video(s) (paths or URLs) to borrow motion/style/look from. Switches the model into referToVideo mode |