Query & Download (Vega Format)
Query the progress and result of a Vega image generation task and download the image, used together with Submit Task. Poll with the returned task_id until status becomes SUCCESS or FAILURE, about once every 2–3 seconds.
Endpoint
- Query task status:
GET /v1/tasks/{task_id} - Download the image:
GET /v1/tasks/{task_id}/artifacts
Authentication
Pass the Bearer token in the request header:
Path Parameters
Query Task Status
GET /v1/tasks/{task_id}
Response Body
Status values:
Response Example
The query response does not contain the image. Once status is SUCCESS, call the download endpoint below to fetch it.
Download the Image
GET /v1/tasks/{task_id}/artifacts
Response Body
Response Example
content_url is a temporary URL: signed and time-limited — do not distribute it as a long-term image link or write it into your database. Download and re-host it to your own storage immediately; once expired, further requests return 502 (see the error table on Submit Task).
The image content can also be fetched from the content endpoint; both return the same content:
Note that the address without ?access= requires a token (Authorization: Bearer sk-your-token); only the artifacts[].content_url form that already carries ?access= is token-free.
Polling Examples
The complete flow from submission to download (you can also start at step 2 with a task_id you already have):
Billing settles against the usage actually returned by the upstream (0 pre-charged at submission; failed tasks are not billed) — measured consumption per model is on the Submit Task billing section.
