Skip to main content

What this lets you do

Turn one reference image into an MP4. Describe movement, camera behavior, and sound. The reference supplies the first frame; it does not guarantee exact identity, fine detail, or motion throughout the result.

What you need

  • An API key with Video enabled and enough API credits
  • One PNG, JPEG, or WebP reference, at most 20 MiB and 4096 pixels per side
  • A nonblank prompt of at most 4,000 characters
  • curl and jq for the examples
The quote checks the normalized image’s size and dimensions. Use an image owned by the authenticated account and accept the quote before the source expires.

Steps

1. Upload the reference

Keep the returned input_asset_id. Do not pass a local path or an arbitrary image URL as the source of a video quote.

2. Quote the animation

Do not set options.aspect_ratio or request a fixed aspect in the prompt. Image-to-video uses the source-driven native aspect profile; a fixed aspect request is rejected rather than silently cropped. Only one source image is supported.

3. Approve, accept, and follow

Follow text-to-video steps 3 through 5 using this video-quote.json. Review the resolved settings and price, save the acceptance body and a new stable idempotency key, then submit to /v1/execute. The acceptance contains only quote_id and max_credits. The source, prompt, and sound settings are already bound to the quote. Poll the returned execution and use the authenticated download flow.

Confirm it worked

The execution reads completed, the MP4 downloads, and the first-frame content and motion are suitable for your project. Review audio as well as visuals.

Common errors

  • 404 asset_expired while quoting: the source is missing, expired, or unavailable to this account.
  • 409 asset_expired on acceptance: the quoted source is no longer usable. Confirm no execution was admitted before uploading a replacement and obtaining another quote.
  • 422 unsupported_settings: remove a fixed aspect request, reduce the source size, or use a supported duration and resolution.
  • 422 invalid_request: supply exactly one source for image_to_video; do not attach a source to text_to_video.

Troubleshooting

Do not re-upload after an uncertain acceptance. Recover the original quote and execution first. A replacement upload has a new asset ID and requires a new quote. Existing image conversations are not used as implicit video references.

Next steps