Skip to main content

Video Generation & Editing

Bailian CLI command reference for video generation, reference-to-video, and video editing.

A single command invokes Bailian's video generation and editing capabilities from the terminal.
Append --help to any command for full parameter details, e.g. bl video generate --help. Every parameter that accepts a file URL also accepts a local path — the CLI auto-uploads it to temporary storage (valid for 48 hours), so you never need to host files as URLs yourself. Command details on this page are verified against bl 2.2.1.

Command reference

bl video generate

Generate a video from text or image (wan3.0-video / wan2.6-t2v / happyhorse-1.1-i2v). Requires API Key authentication. Usage
bl video generate --prompt <text> [--image <url>] [flags]
ParameterTypeRequiredDescription
--model <model>stringnoModel ID (default: wan3.0-video)
--prompt <text>stringyesVideo description
--image <url>stringnoInput image URL for image-to-video generation
--last-frame <url>stringnoLast frame image URL (with --image, enables kf2v first+last frame mode)
--negative-prompt <text>stringnoNegative prompt to exclude unwanted content
--resolution <res>stringnoResolution: 720P or 1080P (default: 1080P)
--ratio <ratio>stringnoAspect ratio (e.g. 16:9, 9:16, 1:1)
--duration <seconds>numbernoVideo duration in seconds (default: 5)
--prompt-extend <bool>booleannoEnable prompt extend (true/false). Omit flag to omit the parameter (DashScope default).
--watermark <bool>booleannoEnable watermark (true/false). Omit flag to use the Profile setting or CLI default (true).
--seed <n>numbernoRandom seed for reproducible generation
--download <path>stringnoSave video to file on completion
--file <url-or-path>stringnoReference file URL or local path for file-to-video (wan3.0-video only; mutually exclusive with --image/--last-frame)
--primeswitchnoUse Prime mode with a workspace-scoped endpoint
--workspace-id <id>stringnoWorkspace ID for the default Prime endpoint (or set BAILIAN_WORKSPACE_ID)
--asyncswitchnoReturn async task id without waiting
--concurrent <n>numbernoRun N parallel requests (default: 1)
--poll-interval <seconds>numbernoPolling interval when waiting (default: 5)
Example: Generate a video from a text description
bl video generate --prompt "A person reading a book, static shot"
  • Prime mode requires an explicit model.
  • Prime endpoint: configured --base-url, DASHSCOPE_BASE_URL, or profile base_url takes precedence; otherwise workspace is resolved from --workspace-id, BAILIAN_WORKSPACE_ID, then config workspace_id.

bl video ref

Reference-to-video generation (wan3.0-video / happyhorse-1.1-r2v / wan2.6-r2v): multi-subject, multi-shot with voice. Requires API Key authentication. Usage
bl video ref --prompt <text> --image <url>... [--ref-video <url>...] [flags]
ParameterTypeRequiredDescription
--model <model>stringnoModel ID (default: wan3.0-video)
--prompt <text>stringyesVideo description with reference markers (image1, video1, etc.)
--image <url>arraynoReference image URL or local file (repeatable for multiple subjects)
--ref-video <url>arraynoReference video URL or local file (repeatable)
--image-voice <url>arraynoVoice URL for corresponding image (pairs by position). On wan3.0-video emitted as reference_audio (refer to Audio 1, Audio 2 in prompt)
--video-voice <url>arraynoVoice URL for corresponding ref-video (pairs by position). On wan3.0-video emitted as reference_audio (refer to Audio 1, Audio 2 in prompt)
--resolution <res>stringnoResolution: 720P or 1080P (default: 1080P)
--ratio <ratio>stringnoAspect ratio (16:9, 9:16, 1:1)
--duration <seconds>numbernoVideo duration in seconds (default: 5)
--prompt-extend <bool>booleannoEnable prompt extend (true/false). Omit flag to omit the parameter (DashScope default).
--watermark <bool>booleannoEnable watermark (true/false). Omit flag to use the Profile setting or CLI default (true).
--seed <n>numbernoRandom seed for reproducible generation
--download <path>stringnoSave video to file on completion
--asyncswitchnoReturn async task id without waiting
--concurrent <n>numbernoRun N parallel requests (default: 1)
--poll-interval <seconds>numbernoPolling interval when waiting (default: 15)
Example: Create a video using a reference image and description
bl video ref --prompt "Image1 running on the grass" --image person.jpg

bl video edit

Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.). Requires API Key authentication. Usage
bl video edit --video <url> --prompt <text> [flags]
ParameterTypeRequiredDescription
--model <model>stringnoModel ID (default: happyhorse-1.0-video-edit)
--video <url>stringyesInput video URL or local file (mp4/mov, 2-10s)
--prompt <text>stringnoEdit instruction (e.g. "Convert the scene to a claymation style")
--ref-image <url>stringnoReference image URL (up to 4, comma-separated)
--negative-prompt <text>stringnoNegative prompt to exclude unwanted content
--resolution <res>stringnoResolution: 720P or 1080P (default: 1080P)
--ratio <ratio>stringnoAspect ratio (16:9, 9:16, 1:1, 4:3, 3:4)
--duration <seconds>numbernoOutput video duration in seconds (2-10)
--audio-setting <mode>stringnoAudio: auto (default) or origin (keep original)
--prompt-extend <bool>booleannoEnable prompt extend (true/false). Omit flag to omit the parameter (DashScope default).
--watermark <bool>booleannoEnable watermark (true/false). Omit flag to use the Profile setting or CLI default (true).
--seed <n>numbernoRandom seed for reproducible generation
--download <path>stringnoSave video to file on completion
--asyncswitchnoReturn async task id without waiting
--concurrent <n>numbernoRun N parallel requests (default: 1)
--poll-interval <seconds>numbernoPolling interval when waiting (default: 15)
Example: Edit a video with style or object changes
bl video edit --video https://example.com/input.mp4 --prompt "Convert the entire scene to claymation style"

bl video download

Download a completed video by task ID. Requires API Key authentication. Usage
bl video download --task-id <id> --out <path>
ParameterTypeRequiredDescription
--task-id <id>stringyesTask ID to download from
--out <path>stringyesOutput file path
Example: Download a video by task ID
bl video download --task-id 3b256896-xxxx --out video.mp4

bl video task get

Query async task status. Requires API Key authentication. Usage
bl video task get --task-id <id>
ParameterTypeRequiredDescription
--task-id <id>stringyesAsync task ID
Example: Check the status of an async video task
bl video task get --task-id 3b256896-3e70-xxxx-xxxx-xxxxxxxxxxxx