Skip to main content
Wan2.1

Wan 2.1 — Query result

Query the status of a Wan 2.1 image editing task

GET
/tasks/{task_id}
Query task result
# China North 2 (Beijing). This model is available only in this region.
# API keys are region-specific. See https://docs.qwencloud.com/developer-guides/getting-started/regions
# Replace {task_id} with the task ID returned when the task was created.
curl -X GET 'https://cn-beijing.maas.qwencloudapi.com/api/v1/tasks/{task_id}' \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY"
{
  "request_id": "eeef0935-02e9-9742-bb55-xxxxxx",
  "output": {
    "task_id": "a425c46f-dc0a-400f-879e-xxxxxx",
    "task_status": "SUCCEEDED",
    "submit_time": "2025-02-21 17:56:31.786",
    "scheduled_time": "2025-02-21 17:56:31.821",
    "end_time": "2025-02-21 17:56:42.530",
    "results": [
      {
        "url": "https://dashscope-result-sh.oss-cn-shanghai.aliyuncs.com/aaa.png"
      }
    ],
    "task_metrics": {
      "TOTAL": 1,
      "SUCCEEDED": 1,
      "FAILED": 0
    }
  },
  "usage": {
    "image_count": 1
  }
}
Query the status and result of an image editing task.

Polling strategy

  1. Submit a request through Create task and get a task_id.
  2. Poll every 10 seconds until task_status is SUCCEEDED or FAILED.
  3. After the task succeeds, results contains the image download URL.

Notes

  • URL expiry: Image URLs expire after 24 hours. Download the results promptly.
  • Status flow: PENDING -> RUNNING -> SUCCEEDED or FAILED.
  • Other statuses: CANCELED (the task was canceled) and UNKNOWN (the task_id is invalid or expired).
  • task_id expiry: A task_id is valid for 24 hours. After that, you cannot query the task status or result.
  • Avoid duplicate submissions: Poll for the result instead of resubmitting the request.

Authorizations

string
header
required

QwenCloud API key. See Get an API key.

Path Parameters

string
required

Task identifier returned when the task was created.

Response

200-application/json
string

Unique request identifier.

object
object

Usage statistics. Counts successful results only.