Video Generations

Create Video Generation

Changed on

Generate a video from a prompt with the model model names, each with its own options: seedance-2.5, optionally guided by reference images and reference videos, or minimax-h3-max, optionally opening on a first_frame image, ending on an end_frame, steered through a middle_frame, and guided by reference images, reference videos and reference audio. The request answers 200 once the generation is accepted, with status pending, and the generation finishes whether or not it is read. Read it with GET /v3/video-generations/{generation_id} until it is completed with a time-limited video_url, or failed, or pass callback_url to receive video_generation.success or video_generation.fail when it finishes; the workspace's configured webhook endpoints receive the same events. Send an Idempotency-Key header with every request: it is required. Repeating a request with the same key and body returns the original generation instead of submitting again. The workspace's API credits are charged at the model's list price when the request starts: the price follows the output length and resolution (and for seedance-2.5 the aspect ratio), plus the length of any reference videos (and for minimax-h3-max their frame rate, the shape of each reference image, the length of any reference audio and any first, end or middle frame). A request the credits cannot cover is refused with 402 insufficient_credit before any work starts, and a generation that fails is refunded. The request body is capped at about 22 MiB, so inline base64 references together must stay under about 16 MiB decoded; send larger or additional references as url or asset_id.

post/v3/video-generations

Request

  • Base URL
    https://api.heygen.com
  • URL
    https://api.heygen.com/v3/video-generations
  • Auth
    • API key in header x-api-key
    • or HTTP bearer

Headers

Idempotency-Keystring required

Required. A retry with the same key and body returns the original generation instead of submitting again, or the same error when its request failed. A different body under the same key returns 409 conflict. A retry that arrives while the original request is still submitting 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

OR

Response

The submitted generation, pending until the model finishes.

Changes