Skip to content

Query Embroidery Task ​

Overview ​

Retrieve task status, the DST file, and the preview image using the ID returned by Create Embroidery Task.

ProtocolEndpointMethodAuthenticationResponse format
HTTPS/open-api/v1/embroidery/query-taskGETBearerapplication/json

Headers ​

ParameterValueDescription
AuthorizationBearerSame authentication as task creation

Query Parameters (HTTP GET) ​

ParameterTypeRequiredDescription
task_idstringYesID returned by the create endpoint

Response ​

ParameterChild fieldTypeDescription
code-int200 means the query succeeded; check state for the generation outcome
datatask_idstringTask ID
statestringcreated, queueing, processing, success, or failed
idstringGenerated asset ID on success
urlstringDST file download URL on success
cover_urlstringPreview image URL on success
msg-stringResponse 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}}'