Imagenty imagen-qwen
Use when generating images with Alibaba Cloud Bailian API, especially for Chinese text rendering or photorealistic images
install
source · Clone the upstream repo
git clone https://github.com/Agents365-ai/imagen-qwen
Claude Code · Install into ~/.claude/skills/
git clone --depth=1 https://github.com/Agents365-ai/imagen-qwen ~/.claude/skills/agents365-ai-imagenty-imagenty
manifest:
SKILL.mdsource content
Imagen-Qwen - Alibaba Cloud Bailian Text-to-Image Skill
Overview
Generate images using Alibaba Cloud Bailian API. Default endpoint is China region.
Supports three model families:
- Qwen-Image 2.0 (latest, native 2K): Flagship general-purpose generator with strong text rendering
- Qwen-Image legacy: Lighter Chinese/English text rendering models
- Wan Series: Photorealistic images and photography-grade visuals (Wan2.7 supports up to 4K)
Cross-platform support: Windows, macOS, Linux
When to Use This Skill
Automatically activate this skill when:
- User requests image generation with Chinese text or calligraphy
- Need photorealistic images or photography-style visuals
- Creating commercial posters, illustrations, or digital art
- User explicitly requests Alibaba Cloud / Bailian / Qwen / Wan models
- Any task where AI-generated image with strong Chinese support would be helpful
Workflow
- Pick a model based on the request (see Model Selection Guide below). Default to
if unsure.qwen-image-2.0-pro - Pick a size: native 2K for the Qwen-Image 2.0 family,
/1K
/2K
for Wan2.7, or an aspect-ratio preset (4K
,16:9
, etc.).1:1 - Run
with the prompt and output path.scripts/generate_image.py - If the output path was implicit, save into the user's current working directory.
Models
Qwen-Image 2.0 family - Latest Flagship (MultiModalConversation API)
| Model | Description |
|---|---|
| Default. Latest flagship, native 2K, strongest typography and detail |
| Standard 2.0 tier, native 2K |
| Previous-gen flagship (Dec 2025) |
Qwen-Image legacy (ImageSynthesis API)
| Model | Description |
|---|---|
| Distilled accelerated version of qwen-image-max |
| Base model |
Wan Series - Photorealistic Generation (ImageGeneration API)
| Model | Description |
|---|---|
| Latest. Up to 4K output, unified architecture (T2I + edit + multi-image) |
| Wan 2.7 standard, up to 2K |
| Wan 2.6, flexible sizing |
| High quality, up to 768x2700 |
| Speed-optimized |
| Professional tier |
| Fast execution |
| Professional tier |
| Earlier generation |
Usage
Basic Usage
# Default model (qwen-image-2.0-pro, native 2K output) python ~/.claude/skills/imagen-qwen/scripts/generate_image.py "A cute cat" output.png # Photorealistic with Wan model (Wan2.7 supports 4K) python ~/.claude/skills/imagen-qwen/scripts/generate_image.py --model wan2.7-image-pro --size 4K "Realistic photo of mountains at sunset" photo.png
Size Options
# Use ratio preset python ~/.claude/skills/imagen-qwen/scripts/generate_image.py --size 16:9 "Wide landscape" landscape.png # Use exact dimensions python ~/.claude/skills/imagen-qwen/scripts/generate_image.py --size 1280*720 "Custom size" custom.png
Size Presets
Qwen-Image 2.0 (native 2K):
-> 2048x2048 (default)1:1
-> 2688x153616:9
-> 1536x26889:16
-> 2304x17284:3
-> 1728x23043:4
-> 1024x10241K
-> 2048x20482K
Qwen-Image legacy:
-> 1328x13281:1
-> 1664x92816:9
-> 928x16649:16
-> 1472x11044:3
-> 1104x14723:4
Wan Series (Wan2.7 also accepts
/1K
/2K
):4K
-> 1024x10241:1
-> 1280x12801:1-large
-> 1280x72016:9
-> 720x12809:16
-> 1200x9004:3
-> 900x12003:4
-> 1440x7202:1
Advanced Options
# With negative prompt python ~/.claude/skills/imagen-qwen/scripts/generate_image.py --negative "blurry, low quality" "High quality portrait" portrait.png # List all models python ~/.claude/skills/imagen-qwen/scripts/generate_image.py --list-models
Requirements
pip install dashscope requests
Environment Variables
# Required - Alibaba Cloud Bailian API Key export DASHSCOPE_API_KEY="your_api_key" # Optional - Set default model export DASHSCOPE_MODEL="wan2.7-image-pro" # Optional - Set API endpoint (default: China) export DASHSCOPE_API_BASE="cn" # or full URL
Get API Key: https://bailian.console.aliyun.com/
API Endpoints
| Region | Alias | URL |
|---|---|---|
| China (default) | | |
| Singapore | | |
| Virginia | | |
# Switch to Singapore endpoint export DASHSCOPE_API_BASE="sg" # Or use full URL export DASHSCOPE_API_BASE="https://dashscope-intl.aliyuncs.com/api/v1"
Model Selection Guide
| Use Case | Recommended Model |
|---|---|
| General high-quality (default) | |
| Chinese text/calligraphy | |
| English text on images | |
| Posters with typography | |
| Photorealistic photos (4K) | |
| Photorealistic photos (2K) | |
| Portrait photography | |
| Fast generation | |
| Lower-cost text rendering | |
Comparison with Imagen (Gemini)
| Feature | Imagen-Qwen (Bailian) | Imagen (Gemini) |
|---|---|---|
| Chinese text rendering | Excellent | Good |
| English text rendering | Excellent | Good |
| Photorealistic images | Excellent | Good |
| Speed | Medium | Fast |
| Model variety | 14 models | 3 models |
| Max resolution | 4K (Wan2.7-Pro) | 2K |
Examples
Chinese New Year Poster
python ~/.claude/skills/imagen-qwen/scripts/generate_image.py \ "A beautiful Chinese New Year poster with red background, golden text, fireworks and firecrackers" \ new_year_poster.png
Photorealistic Landscape (4K)
python ~/.claude/skills/imagen-qwen/scripts/generate_image.py \ --model wan2.7-image-pro \ --size 4K \ "Breathtaking sunset over mountain range, golden hour, professional photography" \ landscape.png
Product Shot
python ~/.claude/skills/imagen-qwen/scripts/generate_image.py \ --model wan2.7-image \ --size 2K \ "Professional product photography of a coffee cup on marble surface, studio lighting" \ product.png