Image Generation
Wan Image Series
Alibaba Tongyi Wanxiang image generation — text-to-image / image-to-image / multi-image reference / image groups / interactive editing
POST
Wan Image Series
Alibaba Tongyi Wanxiang 2.7 unified interface for image generation and editing. Covers wan2.7-image-pro (professional, text-to-image up to 4K) and wan2.7-image (standard, up to 2K) tiers. The two tiers share the same interface via internal tier switching, and are exposed as a single model externally.
Six call modes:
After submission, poll status with
Specifies primary colors and their proportions for the output. The model distributes color coverage in the image based on the given ratios.
Structure: array, each item is
Draw boxes on a reference image to tell the model “edit only inside the box,” leaving the outside unchanged. Exclusive capability of the Wan series for interactive editing.
Structure: triple-nested array
Example (single image, two boxes):
Example (multiple images, one box each):
- Text-to-image (generate) —
promptonly, with optional thinking mode - Image-to-image (image2image) — Free-form generation from a single reference
- Image edit (edit) — Inpainting / style transfer / element replacement
- Multi-image reference (reference) — Fuse up to 9 reference images
- Image group (group) —
enable_sequentialfor comic strips / storyboards, max n = 12 - Interactive editing (interactive_edit) —
bbox_listtargeted region editing (exclusive)
$0.02295 per image.
Pricing
Mode Quick Reference
Examples
GET /v1/tasks/{task_id}. See Task System for details.
Available Models
Common Parameters
string
required
Choose one from the Available Models list. Currently
wan2.7-imagestring
default:"generate"
Operation type. Options:
generate— Text-to-image (default)image2image— Image-to-image (use with singleimage_urls)edit— Image editing (inpainting / style transfer)reference— Multi-image reference fusion (up to 9)group— Image group generation (use withenable_sequential)interactive_edit— Interactive bbox editing (use withbbox_list)
string
required
Image description. Supports Chinese and English. For image-group mode, storyboard-style descriptions work best
integer
default:"1"
Number of images. Standard mode is bounded by service-side limits; image-group mode (
enable_sequential: true) allows up to 12integer
default:"-1"
Random seed.
-1 for random; a fixed value reproduces similar resultsstring
default:"1:1"
Aspect ratio, 7 options:
1:1— Square16:9/9:16— Widescreen landscape / portrait4:3/3:4— Standard landscape / portrait3:2/2:3— Camera ratio landscape / portrait
string
default:"2K"
Output resolution. Options:
1K / 2K / 4K. Note: image-group mode caps at 2Kstring[]
Array of reference image URLs:
image2image/edit/interactive_edit: 1 imagereference: 2-9 images
string
Webhook callback URL, invoked when the task reaches a terminal state. See Callback Mechanism
string[]
Subscribed callback event types. See Callback Mechanism
Model-Specific Parameters
boolean
default:"false"
AI-generated watermark
boolean
default:"true"
Thinking mode — when enabled, the model performs visual reasoning before generation, improving parsing accuracy on complex prompts.Activation conditions: only applies when not in image-group mode (
enable_sequential not true) and without image input (image_urls not provided); ignored otherwiseboolean
default:"false"
Image-group mode (comic strip / storyboard). When enabled:
ncap raises to 12resolutioncapped at 2Kthinking_modeandcolor_palettehave no effect
array
Custom color palette. 3-10 items of
{hex, ratio}, with ratio summing to 100%.Activation condition: only applies in non-group mode. See Composite Field Referencearray
Interactive editing bbox list, one-to-one with
image_urls, max 2 boxes per image.Only applies when action: "interactive_edit". See Composite Field ReferenceComposite Field Reference
color_palette — Custom Color Palette
Specifies primary colors and their proportions for the output. The model distributes color coverage in the image based on the given ratios.
Structure: array, each item is {hex, ratio}
Constraints:
- Item count: 3-10
- Sum of
ratio: strictly 100 (integer percentages) - Only effective in non-group mode (ignored when
enable_sequentialistrue)
bbox_list — Interactive Editing Boxes
Draw boxes on a reference image to tell the model “edit only inside the box,” leaving the outside unchanged. Exclusive capability of the Wan series for interactive editing.
Structure: triple-nested array [[[x1, y1, x2, y2], ...], ...]
- Outermost: each item corresponds to one image in
image_urls, one-to-one (counts must match) - Middle: multiple boxes on a single image, max 2 boxes per image
- Innermost: coordinates of one box, 4 numbers
[x1, y1, x2, y2], top-left and bottom-right corners (pixel coordinates)
- Only applies when
action: "interactive_edit" - Max 2 boxes per image
- Coordinates use the reference image’s original pixels
Resource Limits
Related Docs
- Task System — Task state machine / polling cadence / async push
- Request & Response — Common error codes / Headers / rate limits
- Authentication — API Key application and usage
Wan Image Series