Vizit Public APIAPI
Spark Images

Retrieve a Spark Images batch

Poll for the result of a previously requested Spark Images batch.

GET/v1/images/{image_id}/spark/images/{batch_id}

Returns the current state of a Spark Images batch. Poll until status moves from processing to completed or failed.

data is empty until status is completed. The batch only completes once every prompt is terminal and Spark Cull has resolved every child image; while cull is settling it stays processing with empty data. Once completed, data holds the visible children only — each with a short-lived pre-signed download URL that a fresh request refreshes. A batch that has been non-terminal for longer than the 5-minute timeout is reported as failed here even when the database rows still read as in-flight.

Authorization

bearerAuth
Authorization<token>

Short-lived access token issued by Create a token. Send it on every request as Authorization: Bearer <token>.

In: header

Path Parameters

image_id*string

Root image the batch was requested for.

Formatuuid
batch_id*string

The batch_id returned by Request a Spark Images batch.

Formatuuid

Response Body

application/json

application/json

curl -X GET "https://ext.vizit.com/v1/images/497f6eca-6276-4993-bfeb-53cbbbba6f08/spark/images/497f6eca-6276-4993-bfeb-53cbbbba6f08"
{  "batch_id": "4da22c97-b7d5-4e31-8c3a-03870ebc7b20",  "image_id": "84c230fd-5520-4984-8119-37365b66fd80",  "status": "processing",  "data": [    {      "image_id": "84c230fd-5520-4984-8119-37365b66fd80",      "url": "http://example.com",      "url_expires_at": "2019-08-24T14:15:22Z"    }  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}
Empty
{  "detail": "string",  "status_code": 0,  "error_code": "INVALID_GTIN",  "request_id": "266ea41d-adf5-480b-af50-15b940c2b846",  "extra": {    "failed_urls": [      {        "url": "https://cdn.example.com/broken.jpg",        "reason": "IMAGE_DOWNLOAD_TIMEOUT"      },      {        "url": "https://cdn.example.com/icon.svg",        "reason": "UNSUPPORTED_IMAGE_FORMAT"      }    ]  },  "timestamp": "2019-08-24T14:15:22Z"}