Skip to main content
Wan

Wan v2 — Retrieve image result

Check Wan image status

GET
/tasks/{task_id}
cURL - Query task result
# Replace {task_id} with the actual task ID from the submit response
curl -X GET 'https://dashscope-intl.aliyuncs.com/api/v1/tasks/{task_id}' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"
{
  "request_id": "815505c6-7c3d-49d7-b197-xxxxxx",
  "output": {
    "task_id": "f470bbfd-d955-4165-935b-d35b8exxxxxx",
    "task_status": "SUCCEEDED",
    "choices": [
      {
        "finish_reason": "stop",
        "message": {
          "role": "assistant",
          "content": [
            {
              "image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/xxxxxx.png?Expires=xxxxxx",
              "type": "image"
            }
          ]
        }
      }
    ],
    "finished": true,
    "submit_time": "2026-01-09 17:18:17.901",
    "scheduled_time": "2026-01-09 17:18:17.941",
    "end_time": "2026-01-09 17:18:45.544"
  },
  "usage": {
    "image_count": 1,
    "input_tokens": 0,
    "output_tokens": 0,
    "size": "1280*1280",
    "total_tokens": 0
  }
}
Check task status and retrieve generated images.

Polling strategy

  1. Submit a task via Create task to receive a task_id.
  2. Poll every 5 seconds until task_status is SUCCEEDED or FAILED.
  3. On success, retrieve the image from the response.

Response format differences

Response format varies by model:
  • wan2.6-t2i: Results use chat completion format: output.choices[].message.content[].image.
  • wan2.5 and earlier: Results use output.results[].url format, with orig_prompt and actual_prompt fields.

Important notes

  • URL expiration: Generated image URLs are valid for 24 hours. Download images promptly.
  • Task status flow: PENDING -> RUNNING -> SUCCEEDED or FAILED.
  • Task ID validity: The task_id is valid for 24 hours; afterward, status and results cannot be queried.
  • Do not create duplicate tasks: Use polling to retrieve results. Do not resubmit requests.

Authorizations

string
header
required

DashScope API Key. Create one in the Qwen Cloud console.

Path Parameters

string
required

Task identifier returned by the text-to-image creation endpoint.

Response

200-application/json
string

Unique request identifier for troubleshooting.

object

Task output information.

object

Usage statistics. Only successful results are counted.