All Products
Search
Document Center

Alibaba Cloud Model Studio:Image Generation & Editing

Last Updated:Nov 05, 2026

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.8.0.

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"
  • --model auto (or a config default model of auto) 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, and --async fail with a usage error instead of falling back to REST.

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"
  • --model auto routes AIGC models automatically through Bailian's self-developed MCP and uses only the parameters supported by the MCP tools. Incompatible parameters fail with a usage error instead of falling back to REST. Auto edit accepts a single --image only.