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
Constraints:
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
| Model | Price (per image) |
|---|---|
wan2.7-image | $0.02295 |
Mode Quick Reference
| Mode | Trigger Field | action |
|---|---|---|
| Text-to-image | prompt only (optional thinking_mode) | generate |
| Image-to-image | + image_urls (single) | image2image |
| Image edit | + image_urls (single) + edit-instruction prompt | edit |
| Multi-image reference fusion | + image_urls (2-9) | reference |
| Image group (comic / storyboard) | enable_sequential: true + n ≤ 12 | group |
| Interactive bbox editing | + image_urls + bbox_list | interactive_edit |
Examples
GET /v1/tasks/{task_id}. See Task System for details.
Available Models
| Model ID | Description |
|---|---|
wan2.7-image | Alibaba Tongyi Wanxiang 2.7. Unified interface for text-to-image / image-to-image / editing / multi-image reference / image groups / interactive bbox editing. Up to 4K |
Common Parameters
Choose one from the Available Models list. Currently
wan2.7-imageOperation 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)
Image description. Supports Chinese and English. For image-group mode, storyboard-style descriptions work best
Number of images. Standard mode is bounded by service-side limits; image-group mode (
enable_sequential: true) allows up to 12Random seed.
-1 for random; a fixed value reproduces similar resultsAspect 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
Output resolution. Options:
1K / 2K / 4K. Note: image-group mode caps at 2KArray of reference image URLs:
image2image/edit/interactive_edit: 1 imagereference: 2-9 images
Webhook callback URL, invoked when the task reaches a terminal state. See Callback Mechanism
Subscribed callback event types. See Callback Mechanism
Model-Specific Parameters
AI-generated watermark
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 otherwiseImage-group mode (comic strip / storyboard). When enabled:
ncap raises to 12resolutioncapped at 2Kthinking_modeandcolor_palettehave no effect
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 ReferenceInteractive 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}
| Field | Type | Description |
|---|---|---|
hex | string | Hex color, e.g. #0A2540, case-insensitive |
ratio | number | Percentage coverage in the image. All items must sum to 100 |
- 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
| Item | Limit |
|---|---|
Reference images (reference) | 2-9 |
Reference images (image2image / edit / interactive_edit) | 1 |
| Single image size | ≤ 30MB, supports JPG/PNG/WEBP |
| Output resolution | 1K / 2K / 4K (group mode caps at 2K) |
Group count n | Up to 12 (requires enable_sequential: true) |
bbox_list boxes | Max 2 per image |
color_palette items | 3-10, ratio sums to 100% |
| Output file | JPG URL, valid for 24 hours |
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