Poll a generation
Changed onRetrieves the current status of an asynchronous generation, and its results once complete. Use the generation_id returned by any /v2 endpoint that runs asynchronously: every video and tool endpoint, and any image endpoint called with async or a webhook_url.
While the generation is pending or has failed, the response contains only generation_id, status, and created (plus failure_reason once failed). Once status is completed, the response includes response_type and data. Each data item carries an object_type that identifies its shape, so image and video results can be told apart. usage_cost_usd_micros reports the amount billed when the request uses variable usage-based pricing.
Polling is rate limited per organization; a 429 response carries a Retry-After header with the number of seconds to wait.
Request
- Base URL: (relative, and it does not resolve against the document’s source URL)
- URL: /v2/generations/{generation_id}
- Auth: one of:
- API key in header Api-Key
- HTTP bearer
Path parameters
URL-safe base64 ID of the generation, as returned when the request was accepted.
Response
Generation status retrieved successfully.
Example response
{
"generation_id": "bzue-VZtSlSMAneIbfCo2A",
"status": "completed",
"created": "2000-01-23T04:56:07+00:00",
"response_type": "url",
"data": [
{
"prompt": "prompt",
"resolution": "2048x2048",
"seed": 12345,
"is_image_safe": true,
"url": "https://ideogram.ai/api/images/ephemeral/xtdZiqPwRxqY1Y7NExFmzB.png?exp=1743867804&sig=e13e12677633f646d8531a153d20e2d3698dca9ee7661ee5ba4f3b64e7ec3f89"
}
]
}Changes
- ○
added the optional property
///to the response with the status
- ○
- ▲
added to the
/response propertyoneOflist for the response status - ○
added
layerized_design.generationdiscriminator mapping keys to the/response property for the response status
- ▲