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.
Generate a video from text or image (wan3.0-video / wan2.6-t2v / happyhorse-1.1-i2v). Requires API Key authentication.
Usage
Example: Generate a video from a text description
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
Example: Create a video using a reference image and description
Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.). Requires API Key authentication.
Usage
Example: Edit a video with style or object changes
Download a completed video by task ID. Requires API Key authentication.
Usage
Example: Download a video by task ID
Query async task status. Requires API Key authentication.
Usage
Example: Check the status of an async video task
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
| 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) |
- 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
| 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) |
bl video edit
Edit a video with happyhorse-1.0-video-edit (style transfer, object replacement, etc.). Requires API Key authentication.
Usage
| 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) |
bl video download
Download a completed video by task ID. Requires API Key authentication.
Usage
| Parameter | Type | Required | Description |
|---|---|---|---|
--task-id <id> | string | yes | Task ID to download from |
--out <path> | string | yes | Output file path |
bl video task get
Query async task status. Requires API Key authentication.
Usage
| Parameter | Type | Required | Description |
|---|---|---|---|
--task-id <id> | string | yes | Async task ID |