Video
Video generation through /videos. The one asynchronous surface: the call returns immediately and you poll for the result, because a render takes minutes.
How it works
Creating a render returns a video object in queued with a vid_… id. You then poll GET /videos/{id} until the status is completed (the finished mp4 is in url) or failed (with the reason in error). Credit is reserved at create time and charged only for a completed render — a failed one costs nothing.
Image-to-video
Pass a reference frame in the image field (URL or base64; input_reference is accepted for a single frame) — the router selects the model’s image-to-video variant. Some models (Hailuo 2.3) work only this way and return a 400 without a frame.
Length & price
Length is set with seconds (or its alias duration). The allowed values differ per model and are listed on its page; an out-of-range value is clamped to the nearest allowed one. Most models are billed per second; Veo is billed a flat price per clip regardless of length. The other knobs (resolution, aspect ratio, audio) are the model’s own params — see its page in the catalog.
Downloading
The finished file is at the url link; the same file is served by GET /videos/{id}/content as a 302 redirect — handy when you want to hand the id straight to a player or a downloader.