Skip to main content
Vidu image generation

Vidu image generation — Query the result

Check the status of a Vidu image generation task and download the image

GET
/tasks/{task_id}
Query the task result
# Singapore (ap-southeast-1). This model is available only in this region.
# API keys are region-specific. See https://docs.qwencloud.com/developer-guides/getting-started/regions
curl -X GET 'https://ap-southeast-1.maas.qwencloudapi.com/api/v1/tasks/{task_id}' \
  --header "Authorization: Bearer $DASHSCOPE_API_KEY"
{
  "request_id": "f584a817-6e00-9841-961a-49f7382a03d4",
  "output": {
    "task_id": "6404d4ec-4cdf-45b5-8d7d-3d429c6baed5",
    "task_status": "SUCCEEDED",
    "submit_time": "2026-07-13 20:27:41.291",
    "scheduled_time": "2026-07-13 20:27:41.320",
    "end_time": "2026-07-13 20:28:39.767",
    "finished": true,
    "choices": [
      {
        "finish_reason": "stop",
        "message": {
          "role": "assistant",
          "content": [
            {
              "image": "https://example.com/generated-image.png",
              "type": "image"
            }
          ]
        }
      }
    ]
  },
  "usage": {
    "SR": "2K",
    "size": "2048*2048",
    "image_count": 1
  }
}

Polling strategy

  1. Call Create an image generation task to get a task_id.
  2. Poll this endpoint every 5 seconds until task_status is SUCCEEDED or FAILED.
  3. On success, download the image from output.choices[].message.content[].image.

Notes

  • URL expiration: The image URL expires after 24 hours. Download the image promptly.
  • Task ID expiration: A task_id is valid for 24 hours. After that, the status is returned as UNKNOWN.
  • Task status flow: PENDING → RUNNING → SUCCEEDED or FAILED. CANCELED means the task was canceled.
  • Avoid duplicate submissions: Poll for the result instead of submitting the task again.

Output

FieldDescription
output.task_statusTask status.
output.choices[].message.content[].imageDownload URL of the generated PNG image. Valid for 24 hours.
usage.image_countNumber of generated images.
usage.sizeOutput resolution in width*height format.
usage.SRResolution tier: 1K, 2K, or 4K.

Authorizations

string
header
required

QwenCloud API key. See Get an API key.

Path Parameters

string
required

The task ID returned by the create operation. It is valid for queries for 24 hours.

Response

200-application/json
string

Unique request identifier for tracing and troubleshooting.

object
object

Resource usage. Counts successful results only.