Overview
Alibaba WAN 2.5 is a cutting-edge text-to-image model on Alibaba Cloud’s DashScope. It generates high-quality, detailed images directly from text prompts and supports multiple output resolutions.
Inputs: Text
Outputs: Text and image
Authentication
This endpoint requires authentication using a Bearer token.
Authorization
string
default: "sk-***********"
required
Your API key in the format: YOUR_API_KEY
Request Body
prompt
string
default: "a blue cat"
required
The positive prompt for the generation.
size
string
default: "1024*1024"
768 ~ 1440 per dimension . The size of the generated image in pixels (width*height).
enable_prompt_expansion
boolean
default: "1024*1024"
If set to true, the prompt optimizer will be enabled.
The negative prompt for the generation.
-1 ~ 2147483647. The random seed to use for the generation. -1 means a random seed will be used.
curl -X POST "https://gptproto.com/api/v3/alibaba/wan-2.5/text-to-image" \
-H "Authorization: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a blue cat",
"enable_prompt_expansion": false,
"size": "1024*1024",
"negative_prompt": "",
"seed": -1
}'
Response
Unique identifier for the prediction, Task Id
Status of the task: created, processing, completed, or failed
{
"data" : {
"id" : "5d87273c75ea40f19a34dea994276673" ,
"model" : "alibaba/wan-2.5/text-to-image" ,
"outputs" : [],
"urls" : {
"get" : "https://gptproto.com/api/v3/predictions/5d87273c75ea40f19a34dea994276673/result"
},
"hasNsfwContents" : [],
"status" : "created" ,
"createdAt" : "2025-11-10T09:50:05.977Z" ,
"error" : "" ,
"executionTime" : 0 ,
"timings" : {
"inference" : 0
}
},
"message" : "success" ,
"code" : 200
}
401 - Invalid signature
403 - Invalid Token
403 - Insufficient balance
500 - Internal server error
503 - Content policy violation
{
"error" : {
"message" : "Invalid signature" ,
"type" : "401"
}
}