Image Generation & Editing

Updated at:

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]
ParameterTypeRequiredDescription
--prompt <text>stringyesImage description
--model <model>stringnoModel ID (default: qwen-image-3.0)
--size <W*H>stringnoImage size: ratio (3:4, 16:9, 1:1) or pixels (2048*2048)
--n <count>numbernoNumber of images per request (default: 1, max: 6)
--seed <n>numbernoRandom seed for reproducible generation
--negative-prompt <text>stringnoNegative prompt to exclude unwanted content
--prompt-extend <bool>booleannoEnable prompt extend (true/false). Omit flag: true for qwen-image sync; parameter omitted on async models (API default).
--watermark <bool>booleannoEnable watermark (true/false). Omit flag to use the Profile setting or CLI default (true).
--asyncswitchnoReturn async task id without waiting
--concurrent <n>numbernoRun N parallel requests (default: 1)
--out-dir <dir>stringnoDownload images to directory
--out-prefix <prefix>stringnoFilename prefix (default: image)
--poll-interval <seconds>numbernoPolling 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]
ParameterTypeRequiredDescription
--image <url>arrayyesSource image URL or local file path (repeatable for multi-image merge)
--prompt <text>stringyesEdit instruction text
--model <model>stringnoModel ID (default: qwen-image-3.0)
--size <W*H>stringnoOutput image size: ratio (3:4, 16:9) or pixels (2048*2048)
--n <count>numbernoNumber of images (default: 1, max: 6)
--seed <n>numbernoRandom seed for reproducible results
--negative-prompt <text>stringnoNegative prompt to exclude unwanted content
--function <name>stringnowanx*-imageedit function (default: description_edit). Examples: stylization_all, description_edit
--prompt-extend <bool>booleannoEnable prompt extend (true/false). Omit flag to use CLI default (true).
--watermark <bool>booleannoEnable watermark (true/false). Omit flag to use the Profile setting or CLI default (true).
--out-dir <dir>stringnoDownload images to directory
--out-prefix <prefix>stringnoFilename prefix (default: edited)
--asyncswitchnoReturn async task id without waiting
--concurrent <n>numbernoRun N parallel requests (default: 1)
--poll-interval <seconds>numbernoPolling 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"