---
name: bildy-continuous-video
description: Build a video longer than one generation by chaining clips, taking the last frame of each one as the first frame of the next so they carry on from each other instead of jumping, then joining the run into one file. Use when someone wants a video longer than 10 seconds, a continuous shot, or a clip that keeps the same character or room the whole way through.
---

# A video longer than one generation

Every video model tops out somewhere between four and ten seconds. Asking for
thirty seconds gets you nothing, and generating three separate clips gets you
three clips that jump at the joins, because each one invents its own opening
frame.

The way round it is to hand each clip the frame the previous one ended on.

## The loop, one clip at a time

1. Generate the opening clip with `videos_generate`, or animate a still they
   already have. Poll `videos_get_job` until it is done and keep the link.
2. Call `videos_extract_frame` on that link with `frame: "last"`. Poll
   `videos_get_edit` until it is done. You now have a picture of the final
   frame.
3. Generate the next clip with `videos_generate`, passing that frame's link
   as `imageUrl`, and a prompt describing only what happens next.
4. Repeat from step 2 for as many clips as the video needs.
5. Join the run with `videos_compose`, passing the clip links in order, and
   poll `videos_get_edit` for the finished file.

## Writing the prompt for a middle clip

The model can see the frame it is starting from, so the prompt is about what
changes from here. "She turns away from the window and walks towards the door"
works. Describing the room again wastes the prompt and sometimes makes the
model rebuild it slightly differently.

Carry one style line through every prompt, the same way you would for stills:
the light, the film stock, the lens. Without it you get a different look by the
fourth clip even when the frames line up.

## Tell them what it will cost before you start

Four eight-second clips is thirty-two seconds of video, and video is the
expensive part. Call `videos_list_models` first and multiply. The frame
extractions and the join together cost a few credits, which next to the
generations is nothing, so the clip count and the model are the whole bill.

Generate the first clip and show it before you run the other three. If the
look is wrong, it is wrong in all four.

## Where the chain breaks

The last frame of a clip is often the blurriest one in it, because the model
was mid-motion. A blurry first frame makes a soft second clip. If that
happens, pull a frame slightly earlier by passing a number of seconds to
`videos_extract_frame` instead of `"last"`, and lose a fraction of a second at
the join rather than the sharpness.

Faces change over a long chain. Four clips is usually fine, eight is pushing
it, and by then the person at the end does not quite look like the person at
the start. For anything longer, cut to a different angle partway through and
start a fresh chain there, which is what a real edit would do anyway.

A clip that ends on a hard camera move gives you a frame that reads as a
mistake when it becomes a static opening frame. End each clip somewhere calm.
