Create Image
Changed onGenerate images with gpt-image-2.5, nano-banana-2 or nano-banana-2.1, or edit the reference images when any are given. The request waits for the images and answers 200 with them; a generation is capped at 300 seconds. Send an Idempotency-Key header with every request: it is required. Repeating a request with the same key and body returns the original result instead of generating again, and a duplicate sent while the original is still running gets 409 request_in_progress. A request the workspace's API credits cannot cover at the model's list price is refused with 402 insufficient_credit before any work starts. The credits are charged once the images are generated, at what the image model billed for the request when it reports it, otherwise at the list price; a failed generation is not charged. If the balance no longer covers the charge when the images are ready, the request answers 402 insufficient_credit without them. The request body is capped at about 7.4 MiB, so inline base64 references together must stay under about 5 MiB decoded; send larger or additional images as url or asset_id.
Request
- Base URLhttps://api.heygen.com
- URLhttps://api.heygen.com/v3/images
- Auth
- API key in header x-api-key
- or HTTP bearer
Headers
Required. A retry with the same key and body returns the original result instead of generating again: the images when it finished, or the same error when it failed. A different body under the same key returns 409 conflict. A retry that arrives while the original is still running gets 409 request_in_progress. Scope is the calling user plus the request path: another member of the same workspace sending the same key gets their own generation. A missing or blank value is rejected with 400. Keys must be 1–255 characters from [A-Za-z0-9_:.-]; a UUID is a safe default.
Request body
Response
The finished generation with its images.
Changes
- info
endpoint added
- info