v1

latestOpenAPI 3.1.02026-08-063282108.5 KB
generate

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.

get/v1/generations/{generation_id}

Path parameters

generation_idstring required

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

Headers

Api-Keystring required

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

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 also includes response_type and data. 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.

failure_reasonstring

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