var2_create_video
Create video. Replace/swap something in an existing clip, recast it with a new character, or restyle it into a preset look (anime, claymation…) → use var2_magic_replace instead. Pick type by INPUT: existing clip — www.var2.ai/video/ or video link (free-form prompt edit, "keep the motion") → video-to-video (video_url), NEVER image-to-video for a /video/ link. ONE image to animate → image-to-video. 2-3 image links, one consistent character in a NEW scene → reference-to-video (reference_image_urls), not kling_elements. Portrait image + audio track (talking head) → audio-to-video. Text only → text-to-video. "Turn this image into a video" / "animate this image" — link or URL included — is THIS tool, type=image-to-video, URL as first_frame_url (grok-imagine: reference_image_url); an action verb on an image link beats the /image/ path — NOT var2_get_image_result. Video only — songs/music are a different tool. Models: veo-3.1 (default), ltx-2.3, ltx-retake, wan-2.7, seedance-2, seedance-2.5, seedance-2-mini, happyhorse, kling, kling-3, kling-motion-control, kling-3-motion-control, gemini-omni-video, gemini-omni-flash-1-1, minimax-h3, wan-3, wan-3-prime, kling-3-omni, sora-2, grok-imagine, pruna-avatar (talking head), heygen-avatar-iv (photorealistic talking head). kling-3: optional first/last frame (first_frame_url/last_frame_url or image_urls) + subject refs (kling_elements). kling-3-omni: Kling 3.0 Omni — text, frames, ≤7 references or one reference video, multi-shot, @elements and video edits (video_url) up to 4K.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | kling/kling-3: std | pro. grok: normal | fun | spicy. seedance-2: pro | fast. seedance-2.5: draft (same as draft: true). ltx-retake: replace_audio | replace_video | replace_audio_and_video. kling-motion-control / kling-3-motion-control: 720p | 1080p. | |
| type | No | Pick by INPUT: an existing clip / video URL (free-form edit, "keep the motion") → video-to-video (video_url); swap / recast / preset restyle of a clip → var2_magic_replace instead. ONE image to animate → image-to-video (first_frame_url; grok: reference_image_url). 2-3 reference images for a new scene ("keep this character consistent across these references") → reference-to-video — CALL IT with the URLs the user gave (var2 share links included) as reference_image_urls[] (veo-3.1: reference_images[]); never decline over which param name fits. Portrait + audio track (talking head, "character talking") → audio-to-video — when the user supplies a portrait URL and an audio URL, call immediately (pruna-avatar or heygen-avatar-iv: first_frame_url + audio_url + audio_duration_seconds); any https URL the user pasted is real and usable as-is, whatever its domain. Text only → text-to-video (default). A /video/ URL or "clip" means video-to-video, not image-to-video. | |
| draft | No | seedance-2.5 only — draft mode: a fast, cheap 480p preview (resolution is forced to 480p). Upgrade a draft you like with type=draft-upgrade. | |
| model | No | Default veo-3.1. | |
| shots | No | kling-3 / kling-3-omni multi-shot sequence (when multi_shots=true). Each shot has its own prompt + duration (seconds). kling-3-omni: ≤6 shots, 1–12s each, ≤512 chars, 3–15s total. | |
| sound | No | kling / kling-3 / kling-3-omni — generate audio alongside the video (kling-3-omni: not with a video input). (ltx-2.3 always renders native audio; seedance uses generate_audio.) | |
| prompt | Yes | ||
| duration | No | kling: "5" | "10" (string). grok: "6" | "10" (string). ltx-2.3: 6 | 8 | 10 seconds. seedance: 1-15. gemini-omni-video / gemini-omni-flash-1-1: 4 | 6 | 8 | 10. minimax-h3: whole seconds 4-15 (default 6). wan-3 / wan-3-prime: whole seconds 2-30 (default 5; reference video + output ≤ 30s). kling-3-omni: whole seconds 3-15 (default 5; ignored with a video — the output follows the clip). | |
| audio_url | No | Required for pruna-avatar / heygen-avatar-iv (audio-to-video). Public MP3/WAV/M4A URL, ≤60s. | |
| video_url | No | Source video for video-to-video. wan-2.7 / happyhorse: the clip to edit (must be uploaded to var2 first). ltx-retake: any public video URL to retake a segment of. kling-motion-control / kling-3-motion-control: the motion-reference video (must be pre-registered via var2). gemini-omni-video / gemini-omni-flash-1-1: the clip to edit (Flash reads ≤10s of it). minimax-h3: a 2-15s clip used as the motion/scene reference, billed as input seconds. wan-3 / wan-3-prime: a 1-15s clip used as reference Video1, billed as input seconds. kling-3-omni: a 3-15s clip to edit (+ up to 4 reference_image_urls), billed on its seconds at the video-input rate. | |
| image_urls | No | kling-3 (type=text-to-video) / kling-3-omni: [startFrame] or [startFrame, endFrame] to drive the shot from images (same as first_frame_url / last_frame_url). | |
| input_urls | No | kling-motion-control / kling-3-motion-control only — reference image(s) whose subject is driven by the motion video. | |
| resolution | No | grok: 480p | 720p. wan-2.7: 1080p. seedance-2: 480p | 720p | 1080p | 4k (1080p/4k pro mode only). seedance-2.5 / seedance-2-mini: 480p | 720p. pruna-avatar: 720p (default) | 1080p. heygen-avatar-iv: 1080p only. gemini-omni-video: 720p (default) | 1080p | 4k. gemini-omni-flash-1-1: 360p | 720p (default) | 1080p | 4k. minimax-h3: 768P (default) | 2K. wan-3 / wan-3-prime: 480p | 720p (default) | 1080p. kling-3-omni: 720p (default) | 1080p | 4k. Others: model-specific. | |
| start_time | No | ltx-retake only — segment start offset in seconds. | |
| multi_shots | No | kling-3 / kling-3-omni — true to render a multi-shot sequence from `shots` (kling-3-omni: not with a video). | |
| webhook_url | No | Optional. https:// URL var2 POSTs a signed delivery to when the asset is ready (or fails). Signature header: X-VAR2-Signature: t=<unix>, v1=<hex(hmac_sha256(webhook_secret, t + "." + body))>. Retried with exponential backoff (8 attempts over ~4 days). | |
| aspect_ratio | No | kling/grok: 1:1 | 16:9 | 9:16. veo/sora: portrait | landscape. wan-3 / wan-3-prime: auto (default) | 16:9 | 9:16 | 1:1 | 4:3 | 3:4. | |
| generate_audio | No | seedance-2 / seedance-2.5 / seedance-2-mini / wan-3 / wan-3-prime — generate audio (default true). | |
| kling_elements | No | kling-3 (type=text-to-video) / kling-3-omni: subject reference images for character/object consistency. Each element is a named subject backed by 2+ images (kling-3-omni: 2–4, ≤3 elements, one-word names, not with a video); write @name in the prompt to place it. | |
| last_frame_url | No | Optional end frame for image-to-video — kling-3, veo-3.1, ltx-2.3, seedance-2, wan-2.7, gemini-omni-flash-1-1, minimax-h3, wan-3, wan-3-prime, kling-3-omni (the models with last-frame support). Renders a start→end transition. (kling-3 also accepts an explicit image_urls array; kling 2.6 has NO end frame.) | |
| total_duration | No | kling-3 only — total seconds (5–15). Defaults to the sum of shot durations. | |
| video_duration | No | ltx-retake: full trimmed source duration (drives per-second pricing). kling-motion-control: reference video duration (≤30s); kling-3-motion-control reads it server-side. | |
| first_frame_url | No | Starting frame for image-to-video (all models except grok-imagine); also accepted by kling-3 (type=text-to-video) and used as the portrait for pruna-avatar / heygen-avatar-iv. | |
| negative_prompt | No | kling / kling-3 / wan-2.7 — things to avoid in the output. | |
| reference_images | No | veo-3.1 reference-to-video only — 1–3 character/style reference images (veo uses this param, not reference_image_urls). | |
| reference_labels | No | seedance-2 / seedance-2.5 / seedance-2-mini / minimax-h3 — optional short names for the reference media, aligned by index with reference_image_urls / reference_video_urls / reference_audio_urls (e.g. {"images": ["david", "castle at night"], "videos": ["dolly move"]}). The server prepends them to the prompt as a "[Reference assets]" mapping ("@Image 1: david") so the model binds each asset; leave an entry null to use the type default. ≤64 per type, ≤80 chars each. | |
| source_video_url | No | Deprecated alias for video_url (video-to-video). Prefer video_url. | |
| draft_generation_id | No | seedance-2.5 type=draft-upgrade only — the placeholder_id (or share link) of a finished seedance-2.5 draft. Renders that exact video at 1080p; prompt, aspect ratio and length come from the draft. Drafts can be upgraded for 7 days. | |
| reference_image_url | No | grok-imagine image-to-video only (singular, distinct from reference_image_urls). | |
| reference_audio_urls | No | reference-to-video only — seedance-2 / seedance-2-mini: up to 3 reference audio tracks (≤15s combined); seedance-2.5: up to 10 (≤30s combined); minimax-h3: up to 3 (free; needs a reference image or video alongside); wan-3 / wan-3-prime: up to 5 (each 1-15s, ≤15s combined, free) — name them Audio1, Audio2… in the prompt. | |
| reference_image_urls | No | reference-to-video (seedance-2 / seedance-2.5 / seedance-2-mini / happyhorse / gemini-omni-video / gemini-omni-flash-1-1 / minimax-h3 / wan-3 / wan-3-prime / kling-3-omni) — character/style reference images (plural array; seedance-2 / seedance-2-mini accept up to 9, seedance-2.5 up to 30, the gemini-omni models up to 7, minimax-h3 up to 9 — first 5 free, each extra adds a flat fee; wan-3 / wan-3-prime up to 10, free — name them Image1, Image2… in the prompt; kling-3-omni up to 7 shared with kling_elements, 4 next to a video). veo-3.1 reference mode uses reference_images instead. | |
| reference_video_urls | No | seedance / gemini-omni-video reference-to-video only — seedance-2 / seedance-2-mini: up to 3 reference videos (≤15s combined); seedance-2.5: up to 10 (≤30s combined). Seedance is billed on input + output seconds at the video-input rate. gemini-omni-video: up to 3 (or pass one clip as video_url), flat price per generation. minimax-h3: up to 3 (each 2-15s, ≤15s combined), their seconds are billed at the same per-second rate as the output. wan-3 / wan-3-prime: up to 5 (each 1-15s, ≤15s combined, + output ≤ 30s), billed like minimax-h3 — name them Video1, Video2… in the prompt. kling-3-omni: ONE 3-15s clip (+ up to 4 reference_image_urls); the output follows its length, billed at the video-input rate. | |
| character_orientation | No | kling-motion-control / kling-3-motion-control only — take orientation from the reference image or the motion video. | |
| audio_duration_seconds | No | Required for pruna-avatar / heygen-avatar-iv — drives per-second pricing. | |
| reference_video_durations | No | Seconds per entry of reference_video_urls. Optional — the server measures the files itself for billing; supplying it only makes var2_estimate_cost exact. |