Continue a video past its ending
extend_videoGenerates a NEW segment that continues an existing video from its final frame and returns the new job's id immediately; the result is the original clip with the new segment joined on. WHEN: the user asks to extend, continue or lengthen a video, or wants to see what happens next in a clip they have. Call list_models first if you have not this session: model and the allowed aspect_ratio, resolution and duration come from there, and only models that can start from an image are accepted. duration is the length of the NEW segment, not of the finished video. Say in prompt what happens NEXT: a prompt describing the clip that exists produces a repeat of it. THE CARD: this call already opened the aicut card: do not call show_generation for this job. WAIT: wait_for_generation (this id, media), again at once while terminal: false, then one short line; no get_* polling, timers, background shells or narrating the wait. No card? Give the user the url. COST: this spends the user's tokens, priced like a normal generation of the new segment: the model, duration and resolution decide it, not the source clip's length. An external url costs one media-ingest slot: quote and create from the SAME url to pay it once. SPENDS TOKENS: price with estimate_only: true, ask in the SAME message as the price, and wait for a go that names THIS purchase (SPENDING RULES, this server's instructions). IDEMPOTENCY: a reused idempotency_key REPLAYS the first job whatever the settings: never reuse one for a new generation (this server's instructions).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| audio | No | Generate audio for the new segment, on the models that support it (`list_models` says whether sound costs extra). IT DEFAULTS TO FALSE: the segment is SILENT unless you set it. Only if the user asked; never to save tokens, never carried over. | |
| model | Yes | Model id exactly as `list_models` returns it. Use the one the user asked for; never substitute a cheaper model to save them tokens. | |
| prompt | No | What should happen in the NEW segment. | |
| duration | Yes | Length of the NEW segment in seconds, one of the model's published durations; longer costs more. REQUIRED: if the user gave none, put your pick and its price in the priced ask; never one chosen to save tokens, never carried over. | |
| resolution | No | One of the model's published options; higher costs more. Only if the user asked; never to save tokens, never carried over. | |
| aspect_ratio | Yes | One of the model's published `aspect_ratios`. REQUIRED: the server does not guess it from the source clip and it changes the price on some models. Match the source clip's shape unless the user asked otherwise. | |
| source_video | Yes | URL of the video to continue. A URL from this account's generations or uploads, or a public https URL (imported first); another account's is refused. | |
| estimate_only | No | Price only; creates nothing. | |
| idempotency_key | No | Retry-safety key (IDEMPOTENCY). |