⌘K

Wan 2.5 Image-to-Image Preview (International)

wan25_i2i_preview_intl

Wan2.5 Image-to-Image Preview is Alibaba's image editing model that transforms input images based on text prompts, served via international (Singapore) endpoint.

Authentication

authorization string required

All APIs require authentication via Bearer Token.

Get API Key:

Visit API Key Management Page to get your API Key.

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Value: wan25_i2i_preview_intl


input object required

Input data for the generation request

prompt string required

Positive prompt used to describe the elements and visual characteristics you want in the generated image. Supports Chinese and English. Each Chinese character or letter counts as one character. Content exceeding the limit will be automatically truncated.

Maximum length: 2000 characters

Example: A sitting orange cat, cheerful expression, lively and cute, photorealistic.

negative_prompt string

Negative prompt describing what should not appear in the generated image.

images array of string required

Array of input image URLs or Base64-encoded strings. Supports single image editing and multi-image fusion.

Maximum array length: 3 images. When inputting multiple images, image order is defined by array order.

Image Limitations:
Supported formats: JPEG, JPG, PNG (no transparency), BMP, WEBP
Resolution requirements: Width and height must be between 384 and 5000 pixels
File size: Maximum 10MB

Input Formats:
Method 1: Publicly accessible URL (HTTP or HTTPS)
Example: http://wanx.alicdn.com/material/xxx.jpeg

Method 2: Base64 encoding
Format: data:{MIME_type};base64,{base64_data}
Example: data:image/jpeg;base64,GDU7MtCZzEbTbmRZ...

negative_prompt string

Negative prompt used to describe content you don’t want to appear in the image. Supports Chinese and English. Content exceeding the limit will be automatically truncated.

Maximum length: 500 characters

Example: Low resolution, errors, worst quality, low quality, deformed, extra fingers, bad proportions.


parameters object

Image processing parameters

size string

Output image resolution in the format width*height. Total pixels must be between [768×768, 1280×1280], and aspect ratio must be in the range [1:4, 4:1].

If not specified, the system generates an image with total pixels of 1280×1280 by default, preserving aspect ratio (approximate):
Single image input — aspect ratio matches the input image
Multiple images — aspect ratio matches the last input image

Recommended resolutions for common aspect ratios:
1:1: 1280×1280 or 1024×1024
2:3: 800×1200
3:2: 1200×800
3:4: 960×1280
4:3: 1280×960
9:16: 720×1280
16:9: 1280×720
21:9: 1344×576

Default: 1280×1280

n integer

Number of images to generate. This parameter directly affects billing costs — the higher n is, the higher the cost. Please confirm model pricing before calling. Recommended to set to 1 during testing to control costs.

Range: 1 - 4

Default: 4

watermark boolean

Whether to add a watermark identifier. The watermark is located in the lower right corner of the image with fixed text “AI Generated”.

Options: false, true

Default: false

prompt_extend boolean

Whether to enable intelligent Prompt rewriting. When enabled, a large model is used to intelligently rewrite the input prompt to improve overall performance, but it will increase processing time.

Options: true, false

Default: true

seed integer

Random seed for generation. If not provided, the algorithm automatically generates a random seed. When provided, the algorithm generates seeds for each of the n images based on the given seed — for example, with n=4, seeds seed, seed+1, seed+2, seed+3 are used respectively.

Note: The model generation process is probabilistic; even with the same seed, completely consistent results cannot be guaranteed.

Range: 0 - 2147483647


Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.


Response Format

error object

Error information, only present when status is failed

code string

Error code

message string

Detailed error message


output array

Generation results, only present when status is completed

content array

List of generated resource content

type string

Resource type

Value: image|video

url string

Processed resource URL

jobId string

Remote task ID


usage object

Usage statistics, only present when status is completed

cost string

Total cost in USD

discount number

Discount amount


metadata object

Metadata information