Image and video generation tasks can take tens of seconds to several minutes. These APIs use an asynchronous two-step pattern to prevent HTTP timeouts: create a task, then poll for the result.
Choose a tool:
-
Postman: Graphical HTTP client (best for beginners)
-
cURL: Command-line HTTP client (best for terminal users)
Postman and cURL are for quick testing only. For production, use the official SDK or build your own HTTP client.
How asynchronous generation works
All image and video generation APIs follow a two-step async pattern:
-
Create a task -- Send a POST request with your prompt and parameters. The API returns a
task_id. -
Poll for the result -- Send GET requests with the
task_iduntiltask_statusisSUCCEEDED. The response then contains the output URL.
Task status reference
| Status | Meaning | Action |
|---|---|---|
RUNNING |
The task is in progress. | Poll again in 3-5 seconds. |
SUCCEEDED |
Generation is complete. | Retrieve the output URL from the response. |
Both task_id and the output image URL expire after 24 hours. Download the result promptly.
Send requests with Postman
Prerequisites
Before you begin:
-
Postman installed
cURL-to-Postman parameter mapping
Step 1: Create a task
The following cURL command shows the equivalent request you will configure in Postman:
curl -X POST https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis \
-H 'X-DashScope-Async: enable' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "wan2.5-t2i-preview",
"input": {
"prompt": "A flower shop with exquisite windows, a beautiful wooden door, and flowers on display"
},
"parameters": {
"size": "1024*1024",
"n": 1
}
}'
Different regions use separate base_urls.
Configure the request in Postman:
-
Click + to create a new HTTP request.
-
Set method to POST and enter the endpoint URL:

-
Singapore:
https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis -
Virginia:
https://dashscope-us.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis -
Beijing:
https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis
-
-
In the Headers tab, add:
Key Value Purpose X-DashScope-AsyncenableEnable asynchronous mode AuthorizationBearer <your-api-key>Authentication. Replace <your-api-key>with your Model Studio API key.Content-Typeapplication/jsonSpecify JSON request body 
-
In the Body tab, select raw → JSON, then paste:
{ "model": "wan2.5-t2i-preview", "input": { "prompt": "A flower shop with exquisite windows, a beautiful wooden door, and flowers on display" }, "parameters": { "size": "1024*1024", "n": 1 } }
-
Click Send. The response contains a
task_id— save it for Step 2.
Step 2: Poll for the result
Use the task_id from Step 1 to query task status.
Equivalent cURL command:
curl -X GET https://dashscope-intl.aliyuncs.com/api/v1/tasks/{task_id} \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"
Configure the query request in Postman:
-
Create a new HTTP request and set method to GET.
-
Enter the query URL. Replace
{task_id}with the value from Step 1:-
Singapore:
https://dashscope-intl.aliyuncs.com/api/v1/tasks/{task_id} -
Virginia:
https://dashscope-us.aliyuncs.com/api/v1/tasks/{task_id} -
Beijing:
https://dashscope.aliyuncs.com/api/v1/tasks/{task_id}
-
-
In the Headers tab, add the
Authorizationkey (same API key as Step 1). -
Click Send.

If task_status is RUNNING, wait 3-5 seconds and click Send again. When SUCCEEDED, copy the image URL.
The image URL expires after 24 hours. Download the image before it expires.
Send requests with cURL
Prerequisites
Before you begin, make sure you have:
-
cURL installed on your system
Step 1: Create a task
Run the following command in your terminal:
curl -X POST https://dashscope-intl.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis \
-H 'X-DashScope-Async: enable' \
-H "Authorization: Bearer $DASHSCOPE_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "wan2.5-t2i-preview",
"input": {
"prompt": "A flower shop with exquisite windows, a beautiful wooden door, and flowers on display"
},
"parameters": {
"size": "1024*1024",
"n": 1
}
}'
Different regions use separate base_urls.
The response returns a task_id:

Step 2: Poll for the result
Replace {task_id} with the value from Step 1:
curl -X GET https://dashscope-intl.aliyuncs.com/api/v1/tasks/{task_id} \
--header "Authorization: Bearer $DASHSCOPE_API_KEY"
Different regions use separate base_urls.
When task_status is SUCCEEDED, the response contains the image URL:
Next steps
-
Explore API parameters: See the text-to-image API reference for all input and output parameters.
-
Generate videos: Use the first-frame-to-video API.
-
Browse available models: Visit the Model list for all image and video models.