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.
ImportantAppend --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.8.0.
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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--model <model> | string | no | Model ID (default: wan3.0-video) |
--prompt <text> | string | yes | Video description |
--image <url> | string | no | Input image URL for image-to-video generation |
--last-frame <url> | string | no | Last frame image URL (with --image, enables kf2v first+last frame mode) |
--negative-prompt <text> | string | no | Negative prompt to exclude unwanted content |
--resolution <res> | string | no | Resolution: 720P or 1080P (default: 1080P) |
--ratio <ratio> | string | no | Aspect ratio (e.g. 16:9, 9:16, 1:1) |
--duration <seconds> | number | no | Video duration in seconds (default: 5) |
--prompt-extend <bool> | boolean | no | Enable prompt extend (true/false). Omit flag to omit the parameter (DashScope default). |
--watermark <bool> | boolean | no | Enable watermark (true/false). Omit flag to use the Profile setting or CLI default (true). |
--seed <n> | number | no | Random seed for reproducible generation |
--download <path> | string | no | Save video to file on completion |
--file <url-or-path> | string | no | Reference file URL or local path for file-to-video (wan3.0-video only; mutually exclusive with --image/--last-frame) |
--prime | switch | no | Use Prime mode with a workspace-scoped endpoint |
--workspace-id <id> | string | no | Workspace ID for the default Prime endpoint (or set BAILIAN_WORKSPACE_ID) |
--async | switch | no | Return async task id without waiting |
--concurrent <n> | number | no | Run N parallel requests (default: 1) |
--poll-interval <seconds> | number | no | Polling interval when waiting (default: 5) |
Example: Generate a video from a text description
bl video generate --prompt "A person reading a book, static shot"
-
--model auto(or a config default model ofauto) routes AIGC models automatically through Bailian's self-developed MCP and uses only the parameters supported by the MCP tools. Incompatible parameters such as--seed,--watermark,--prime, and--asyncfail with a usage error instead of falling back to REST. -
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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--model <model> | string | no | Model ID (default: wan3.0-video) |
--prompt <text> | string | yes | Video description with reference markers (image1, video1, etc.) |
--image <url> | array | no | Reference image URL or local file (repeatable for multiple subjects) |
--ref-video <url> | array | no | Reference video URL or local file (repeatable) |
--image-voice <url> | array | no | Voice 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> | array | no | Voice 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> | string | no | Resolution: 720P or 1080P (default: 1080P) |
--ratio <ratio> | string | no | Aspect ratio (16:9, 9:16, 1:1) |
--duration <seconds> | number | no | Video duration in seconds (default: 5) |
--prompt-extend <bool> | boolean | no | Enable prompt extend (true/false). Omit flag to omit the parameter (DashScope default). |
--watermark <bool> | boolean | no | Enable watermark (true/false). Omit flag to use the Profile setting or CLI default (true). |
--seed <n> | number | no | Random seed for reproducible generation |
--download <path> | string | no | Save video to file on completion |
--async | switch | no | Return async task id without waiting |
--concurrent <n> | number | no | Run N parallel requests (default: 1) |
--poll-interval <seconds> | number | no | Polling 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]
| Parameter | Type | Required | Description |
|---|---|---|---|
--model <model> | string | no | Model ID (default: happyhorse-1.0-video-edit) |
--video <url> | string | yes | Input video URL or local file (mp4/mov, 2-10s) |
--prompt <text> | string | no | Edit instruction (e.g. "Convert the scene to a claymation style") |
--ref-image <url> | string | no | Reference image URL (up to 4, comma-separated) |
--negative-prompt <text> | string | no | Negative prompt to exclude unwanted content |
--resolution <res> | string | no | Resolution: 720P or 1080P (default: 1080P) |
--ratio <ratio> | string | no | Aspect ratio (16:9, 9:16, 1:1, 4:3, 3:4) |
--duration <seconds> | number | no | Output video duration in seconds (2-10) |
--audio-setting <mode> | string | no | Audio: auto (default) or origin (keep original) |
--prompt-extend <bool> | boolean | no | Enable prompt extend (true/false). Omit flag to omit the parameter (DashScope default). |
--watermark <bool> | boolean | no | Enable watermark (true/false). Omit flag to use the Profile setting or CLI default (true). |
--seed <n> | number | no | Random seed for reproducible generation |
--download <path> | string | no | Save video to file on completion |
--async | switch | no | Return async task id without waiting |
--concurrent <n> | number | no | Run N parallel requests (default: 1) |
--poll-interval <seconds> | number | no | Polling 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>
| Parameter | Type | Required | Description |
|---|---|---|---|
--task-id <id> | string | yes | Task ID to download from |
--out <path> | string | yes | Output 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>
| Parameter | Type | Required | Description |
|---|---|---|---|
--task-id <id> | string | yes | Async task ID |
Example: Check the status of an async video task
bl video task get --task-id 3b256896-3e70-xxxx-xxxx-xxxxxxxxxxxx