#Task query
Query task
http
GET /v1/tasks/{id}Returned task object:
| Field | Description |
|---|---|
id | Task ID |
capability | Capabilities, such as image.pose |
status | Status, see table below |
template_id | Template used |
idempotency_key | The Idempotency-Key passed in when creating was not passed as null |
cost | For the points of this task (actually deducted after success), see Billing and Points |
output | Value when successful: { "images": [image URL] } |
error | Value on failure: { "code", "message" } |
created_at / started_at / finished_at | Creation, start, end time (UTC) |
| Status | Meaning |
|---|---|
queued | Queuing |
running | Generating |
succeeded | Success |
failed | Failed |
It is recommended to query every 3 to 5 seconds until the status is succeeded or failed. Tasks that are not completed for more than 15 minutes will be judged as failed.
The resulting images will be cleaned regularly, please download and save them in time.
Task list
http
GET /v1/tasks?page=1&pageSize=20&status=succeededjson
{ "data": [], "total": 42, "page": 1, "page_size": 20 }