DEV Community

张洲诚(Zack.ZHANG)
张洲诚(Zack.ZHANG)

Posted on

I Built a 6-Step E-Commerce Visual Pipeline Using Only CLI Commands


The Problem

E-commerce product listing requires visual assets at scale. Each SKU needs: 5 white-background shots, 4 lifestyle scenes, 3 model photos, 2 marketing banners, and 1 showcase video.

Industry pricing (2026 China market reference): basic product photography runs $110-700/set, full shoots with models and video reach $1,400+. For 20 products, that's tens of thousands just on visuals.

As a developer, when I see repetitive work, I think about scripting. So I went looking for an automation-first solution.

Why GUI Tools Failed Me

Every AI image tool I tried only solved one step:

  • Tool A does background removal, not model try-on
  • Tool B generates great images but loses product details
  • Tool C is full-featured but costs $30-70/month with image caps

The real problem wasn't quality — it was the manual pipeline between tools. Download from A, upload to B, download from B, upload to C. Repeat 20 times.

The Fix: CLI = Scriptable = Batchable

I discovered Bailian CLI (bl) — it wraps image generation, image editing, and video generation into a single command-line tool.

Setup

npm install -g bailian-cli
bl config set api_key YOUR_KEY
Enter fullscreen mode Exit fullscreen mode

Get a free API key — starter credits cover this entire tutorial.

My 6-Step Pipeline

Product: Vintage brown leather crossbody bag.

Step 1: White-background product shot

bl image generate --prompt "vintage brown leather crossbody bag, white background, product photography, 45-degree angle"
Enter fullscreen mode Exit fullscreen mode

For example: "Generate 4 e-commerce hero images in different scene styles, covering dining, kitchen, home, and café scenarios" — just describe what you need in plain language.

Step 2: Lifestyle scene

bl image edit --image ./product-white.png --prompt "Place bag on rustic café table, warm lighting, lifestyle feel"
Enter fullscreen mode Exit fullscreen mode

For example: "Generate a suitable background for the product in the image, conveying a refreshing, cool sensation"

Step 3: Virtual model try-on

bl image edit --image ./product-white.png --reference ./model-photo.png --prompt "Model wearing this crossbody bag naturally, maintain pose"
Enter fullscreen mode Exit fullscreen mode

For example: "Virtual try-on of clothing onto my own body, keeping my face, body shape, and pose unchanged"

Step 4: Style variants

bl image edit --image ./scene.png --prompt "6 style variants: warm soft, cool minimal, vintage film, Japanese fresh, dark luxury, vibrant Instagram"
Enter fullscreen mode Exit fullscreen mode

For example: "Generate 6 different style variants: warm soft-light, cool minimal, vintage film, fresh Japanese, dark luxury, vibrant Instagram" — exact same wording works.

Step 5: Marketing banner

bl image generate --prompt "E-commerce banner, bag centered, bold '50% OFF', gold accents, dark background" --size 1280x720
Enter fullscreen mode Exit fullscreen mode

For example: "Generate a high-quality e-commerce marketing poster suitable for Taobao and Xiaohongshu platforms"

Step 6: Product video

bl video generate --image ./scene.png --prompt "Product rotating on turntable, warm lighting, bokeh" --duration 5
Enter fullscreen mode Exit fullscreen mode

For example: "Generate a product showcase video suitable for Douyin/TikTok and Kuaishou platforms"

Batch Mode

for product in crossbody-bag tote backpack wallet belt; do
  bl image generate \
    --prompt "${product}, white background, product photography" \
    --output "./output/${product}-main.png"
done
Enter fullscreen mode Exit fullscreen mode

20 SKUs done in one coffee break.

Cost Comparison

Based on Bailian official pricing (July 2026): qwen-image-2.0-pro = $0.071676/image, wan2.6-i2v 720P = $0.086012/sec.

Traditional (China market) CLI (official pricing)
Total per SKU ~$780-1,850 ~$1.44
Time per SKU 5-7 days 15-20 min
Batch capability Linear Scriptable

Traditional pricing: 2026 industry survey data. CLI cost: 15 images × $0.072 + 5s video × $0.086.

Honest Take

Key limitations to note:

Works great for: Small-to-medium sellers, daily listings, flash sale prep
Limitations: Text rendering occasionally glitches, fine metal details (buckles/zippers) can "mutate", luxury goods still need real photography

Get Started

  1. Install CLI
  2. Free API key

If you're the "script everything" type, this might be the highest-ROI tool discovery of the year for e-commerce visuals.

Top comments (0)