Poll a generation
Authentication
API key for access control. Use in the header with the name “Api-Key”
Path parameters
URL-safe base64 ID of the generation returned by the async generation endpoint.
Response
URL-safe base64 ID of the generation.
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.
Present when status is completed; always “url” for this shape.
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.
A short machine-readable reason the generation failed, for example
content_policy_violation. Present only when status is failed.
A list of generated images or videos. Present when status is
completed. Video entries carry an object_type of
video.generation; entries without an object_type are images.