Skip to main content
Person instance segmentation

Person instance segmentation — Query the result

Poll a person instance segmentation task and retrieve the mask and visualization images

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-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/result1.png",
    "output_vis_image_url": "http://xxx/result2.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 mask and visualization image URLs are valid for 24 hours. Download them promptly.

Authorizations

string
header
required

QwenCloud API key. See API keys.

Path Parameters

string
required

Task ID returned by POST /services/aigc/image2image/image-synthesis.

Response

200-application/json
string

Unique request identifier for tracing and troubleshooting.

b67df059-ca6a-9d51-afcd-9b3c4456b1e2
object

Task output.

object

Usage statistics. Returned only when the task succeeds.