Query Embroidery Task
Overview
Retrieve task status, the DST file, and the preview image using the ID returned by Create Embroidery Task.
| Protocol | Endpoint | Method | Authentication | Response format |
|---|---|---|---|---|
| HTTPS | /open-api/v1/embroidery/query-task | GET | Bearer | application/json |
Headers
| Parameter | Value | Description |
|---|---|---|
| Authorization | Bearer | Same authentication as task creation |
Query Parameters (HTTP GET)
| Parameter | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | ID returned by the create endpoint |
Response
| Parameter | Child field | Type | Description |
|---|---|---|---|
| code | - | int | 200 means the query succeeded; check state for the generation outcome |
| data | task_id | string | Task ID |
| state | string | created, queueing, processing, success, or failed | |
| id | string | Generated asset ID on success | |
| url | string | DST file download URL on success | |
| cover_url | string | Preview image URL on success | |
| msg | - | string | Response message |
Read result URLs only after state=success. Result fields may be empty or omitted for other states. Stop polling on state=failed; code can still be 200. Download URLs may be signed: preserve the full URL and download promptly. Query again for a fresh URL if it expires. Other model format fields are not outputs of this endpoint.
Response Examples
json
{
"code": 200,
"data": {
"task_id": "embroidery_example_task",
"state": "success",
"id": "embroidery_example_asset",
"url": "https://example.com/result.dst",
"cover_url": "https://example.com/preview.png"
},
"msg": "success"
}Failed task:
json
{"code":200,"data":{"task_id":"embroidery_example_task","state":"failed"},"msg":"success"}Request Example (Shell)
shell
curl --location 'https://api.hitem3d.ai/open-api/v1/embroidery/query-task?task_id=embroidery_example_task' \
--header 'Authorization: Bearer {{token}}'