Skip to main content
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:
  • Text-to-image (generate)prompt only, 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_sequential for comic strips / storyboards, max n = 12
  • Interactive editing (interactive_edit)bbox_list targeted region editing (exclusive)
Per-image pricing, unified at $0.02295 per image.

Pricing

Mode Quick Reference

Examples

After submission, poll status with 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-image
string
default:"generate"
Operation type. Options:
  • generate — Text-to-image (default)
  • image2image — Image-to-image (use with single image_urls)
  • edit — Image editing (inpainting / style transfer)
  • reference — Multi-image reference fusion (up to 9)
  • group — Image group generation (use with enable_sequential)
  • interactive_edit — Interactive bbox editing (use with bbox_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 12
integer
default:"-1"
Random seed. -1 for random; a fixed value reproduces similar results
string
default:"1:1"
Aspect ratio, 7 options:
  • 1:1 — Square
  • 16:9 / 9:16 — Widescreen landscape / portrait
  • 4:3 / 3:4 — Standard landscape / portrait
  • 3:2 / 2:3 — Camera ratio landscape / portrait
string
default:"2K"
Output resolution. Options: 1K / 2K / 4K. Note: image-group mode caps at 2K
string[]
Array of reference image URLs:
  • image2image / edit / interactive_edit: 1 image
  • reference: 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 otherwise
boolean
default:"false"
Image-group mode (comic strip / storyboard). When enabled:
  • n cap raises to 12
  • resolution capped at 2K
  • thinking_mode and color_palette have no effect
Suited for storyboards, comic strips, and themed e-commerce sets — any “themed group of related images” use case
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 Reference
array
Interactive editing bbox list, one-to-one with image_urls, max 2 boxes per image.Only applies when action: "interactive_edit". See Composite Field Reference

Composite 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_sequential is true)
Example:

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)
Constraints:
  • Only applies when action: "interactive_edit"
  • Max 2 boxes per image
  • Coordinates use the reference image’s original pixels
Example (single image, single box):
Example (single image, two boxes):
Example (multiple images, one box each):

Resource Limits