Skip to main content
Image erase completion

Image erase completion — Query the result

Poll an image erase completion task and retrieve the result image

GET
/tasks/{task_id}
cURL
# 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
curl --request GET \
  --url https://cn-beijing.maas.qwencloudapi.com/api/v1/tasks/{task_id} \
  --header "Authorization: Bearer $DASHSCOPE_API_KEY"
{
  "request_id": "b67df059-ca6a-9d51-afcd-9b3c4456b1e2",
  "output": {
    "task_id": "53950fb7-281a-4e60-b543-xxxxxxxxxxxx",
    "task_status": "SUCCEEDED",
    "submit_time": "2024-05-16 13:50:01.247",
    "scheduled_time": "2024-05-16 13:50:01.354",
    "end_time": "2024-05-16 13:50:27.795",
    "output_image_url": "http://xxx/result.png"
  },
  "usage": {
    "image_count": 1
  }
}
Poll this operation with the task_id returned by Create a task. Keep polling until task_status is SUCCEEDED or FAILED. Supported regions: China North 2 (Beijing) only. Use an API key created in that region and the https://cn-beijing.maas.qwencloudapi.com endpoint. See Regions and endpoints.
  • The result image URL is valid for 24 hours. Download the image promptly.
  • Billing is based on successfully generated images. Failed calls are not billed.

Authorizations

string
header
required

QwenCloud API key. See API keys.

Path Parameters

string
required

Task ID returned by the create-task operation.

Response

200-application/json
string

Unique request identifier.

object
object

Metering information. Returned only when the task succeeds.