Image Generation & Editing
Bailian CLI command reference for image generation and editing.
A single command invokes Bailian's image generation and editing capabilities from the terminal.
ImportantAppend --help to any command for full parameter details, e.g. bl image 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 image generate
Generate images (Qwen-Image / wan2.x). Requires API Key authentication.
Usage
bl image generate --prompt <text> [flags]
| Parameter | Type | Required | Description |
|---|---|---|---|
--prompt <text> | string | yes | Image description |
--model <model> | string | no | Model ID (default: qwen-image-3.0) |
--size <W*H> | string | no | Image size: ratio (3:4, 16:9, 1:1) or pixels (2048*2048) |
--n <count> | number | no | Number of images per request (default: 1, max: 6) |
--seed <n> | number | no | Random seed for reproducible generation |
--negative-prompt <text> | string | no | Negative prompt to exclude unwanted content |
--prompt-extend <bool> | boolean | no | Enable prompt extend (true/false). Omit flag: true for qwen-image sync; parameter omitted on async models (API default). |
--watermark <bool> | boolean | no | Enable watermark (true/false). Omit flag to use the Profile setting or CLI default (true). |
--async | switch | no | Return async task id without waiting |
--concurrent <n> | number | no | Run N parallel requests (default: 1) |
--out-dir <dir> | string | no | Download images to directory |
--out-prefix <prefix> | string | no | Filename prefix (default: image) |
--poll-interval <seconds> | number | no | Polling interval when waiting (default: 3) |
Example: Generate an image from a text prompt
bl image generate --prompt "A cat in a spacesuit on Mars"
bl image edit
Edit an existing image with text instructions (Qwen-Image / Wan 2.7). Requires API Key authentication.
Usage
bl image edit --image <url> --prompt <text> [flags]
| Parameter | Type | Required | Description |
|---|---|---|---|
--image <url> | array | yes | Source image URL or local file path (repeatable for multi-image merge) |
--prompt <text> | string | yes | Edit instruction text |
--model <model> | string | no | Model ID (default: qwen-image-3.0) |
--size <W*H> | string | no | Output image size: ratio (3:4, 16:9) or pixels (2048*2048) |
--n <count> | number | no | Number of images (default: 1, max: 6) |
--seed <n> | number | no | Random seed for reproducible results |
--negative-prompt <text> | string | no | Negative prompt to exclude unwanted content |
--function <name> | string | no | wanx*-imageedit function (default: description_edit). Examples: stylization_all, description_edit |
--prompt-extend <bool> | boolean | no | Enable prompt extend (true/false). Omit flag to use CLI default (true). |
--watermark <bool> | boolean | no | Enable watermark (true/false). Omit flag to use the Profile setting or CLI default (true). |
--out-dir <dir> | string | no | Download images to directory |
--out-prefix <prefix> | string | no | Filename prefix (default: edited) |
--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: 3) |
Example: Edit an image using a text instruction
bl image edit --image ./photo.png --prompt "Replace the background with a beach"