generate

Poll a generation

Changed on

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. Once status is completed, the response includes response_type and data, and may include usage_cost_usd_micros when the request uses variable usage-based pricing.

get/v1/generations/{generation_id}

Request

  • Base URL: https://api.ideogram.ai
  • URL: https://api.ideogram.ai/v1/generations/{generation_id}
  • Auth: API key in header Api-Key

Path parameters

generation_idstring required

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

Response

Generation status retrieved successfully.

generation_idstring required

URL-safe base64 ID of the generation.

status'pending' | 'completed' | 'failed' required

Current status of the generation. pending: still in progress; the response contains only generation_id, status, and created. completed: finished successfully; the response includes response_type and data, and may include usage_cost_usd_micros when the request uses variable usage-based pricing. failed: generation did not succeed; the response contains only generation_id, status, and created.

createdstring date-time required

The time the generation was created.

response_type'url'

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

usage_cost_usd_microsinteger

The total variable usage-based cost charged for the completed request, in millionths of a US dollar. Present only when status is completed and the request uses variable usage-based pricing; omitted otherwise.

failure_reasonstring

A short machine-readable reason the generation failed, for example content_policy_violation. Present only when status is failed.

Changes

    • breaking

      added subschema #2 subschema #4 to the / response property oneOf list for the response status

    • info

      removed subschema #2 from the / response property oneOf list for the response status

    • warning

      deleted the header request parameter Api-Key

    • info

      the endpoint scheme security ApiKeyAuth was added to the API