⌘K

Wan 2.5 Text-to-Image Preview (International)

wan25_t2i_preview_intl

Wan2.5 Text-to-Image Preview is Alibaba's image generation model supporting flexible resolutions within total pixel constraints, 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_t2i_preview_intl


input object required

Input data for the generation request.

prompt string required

Positive prompt used to describe the image content, style, and composition you expect to generate. Supports Chinese and English.

negative_prompt string

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


parameters object

Image processing parameters

size string

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

Recommended resolutions for common aspect ratios:
1:1: 1280×1280
3:4: 1104×1472
4:3: 1472×1104
9:16: 960×1696
16:9: 1696×960

Default: 1280×1280

n integer

Number of images to generate. This parameter directly affects billing costs (Cost = Unit price × Number of images), please confirm model pricing before calling. Recommended to set to 1 during testing.

Range: 1 - 4

Default: 4

prompt_extend boolean

Whether to enable intelligent Prompt rewriting. When enabled, a large model is used to optimize positive prompts, which has a significant effect on shorter prompts but adds 3–4 seconds of processing time.

Options: true, false

Default: true

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

seed integer

Random seed for generation. Using the same seed value can keep the generated content relatively stable. If not provided, the algorithm will automatically use a random seed.

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