Poll a generation

Retrieves the current status of an asynchronous generation, and its results once complete. Use the `generation_id` returned by the async generation endpoint. While the generation is `pending` or has `failed`, the response contains only `generation_id`, `status`, and `created`; the `response_type` and `data` fields are present only once `status` is `completed`.

Authentication

Api-Keystring

API key for access control. Use in the header with the name “Api-Key”

Path parameters

generation_idstringRequired

URL-safe base64 ID of the generation returned by the async generation endpoint.

Response

Generation status retrieved successfully.
generation_idstring

URL-safe base64 ID of the generation.

statusenum

Current status of the generation. pending: still in progress; the response contains only generation_id, status, and created. completed: finished successfully; the response also includes response_type and data. failed: generation did not succeed; the response contains only generation_id, status, and created.

createddatetime
The time the generation was created.
response_typeenum

Present when status is completed; always “url” for this shape.

datalist of objects

A list of generated images. Present when status is completed.

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
429
Too Many Requests Error