POST /v1/videos, and poll the returned video until it’s ready. A last frame is only valid alongside a first frame; prompt is still required. This is one of three H3 Video modes; see also Text to Video and First Frame to Video.
Set VIGGLE_API_KEY and run the example below as-is — it uses Viggle-hosted sample images, so you don’t need to prepare your own frames first.
What you need
- An API key from the Viggle Dashboard, exported as
VIGGLE_API_KEY - A non-empty text prompt and a
qualitychoice:loworhigh
The example below references placeholder sample asset URLs (
https://assets.viggle.ai/samples/first-frame.png and .../last-frame.png). Swap in your own first_frame_image/first_frame_image_url and last_frame_image/last_frame_image_url, or Viggle’s published sample assets once available.Generate and poll the video
Response
status: "queued" — it’s an acceptance acknowledgment, not the final result. Poll GET /v1/videos/{video_id} every 3–5 seconds until status is ready, failed, or cancelled, then read video_url — a signed link, valid for 1 hour and re-signed on every read. Supplying a last frame without a first frame answers 400 INVALID_REQUEST — “a last frame requires a first frame”; supplying both the file and URL form of the same slot answers 400 INVALID_REQUEST — “supply only one of first_frame_image or first_frame_image_url”.
See Pricing and retention — image-conditioned generation costs the same as text-only for the same quality and duration_s.
Generate Video (from First-Last Frames and/or Text)
See every field, both upload forms, and common validation errors.

