Extend video duration

Beta
Lengthen an existing video by generating new frames at its beginning or end. The model uses context frames from the input to produce a seamless continuation with consistent motion and audio. Responds immediately with the job `id` and `created_at` timestamp. Poll `GET /v2/extend/{id}` until the status is `completed`, then download from `result.video_url`.

Authentication

AuthorizationBearer
API key authentication

Request

This endpoint expects an object.
video_uristringRequired

Input video for extending. See Input Formats for supported formats and codecs.

  • Supported aspect ratios: 16:9 and 9:16
  • Maximum resolution: 3840x2160 (4K)
  • Minimum frame count: 73 (around 3 seconds at 24fps)

The output video preserves the input video’s resolution.

durationdoubleRequired2-20

Duration in seconds to extend the video. Minimum 2 seconds, maximum 20 seconds (480 frames at 24fps).

promptstringOptional<=5000 characters
Description of what should happen in the extended portion of the video.
modeenumOptionalDefaults to end

Where to extend the video:

  • end (default): Extends the video at the end.
  • start: Extends the video at the beginning.
Allowed values:
modelenumOptionalDefaults to ltx-2-3-pro
Model to use for video generation.
Allowed values:
contextdoubleOptional1-20

Advanced parameter: Number of seconds from the input video to use as context for the extension (maximum 20 seconds).

The model uses context frames from the input video to generate a more coherent extension. The sum of context + duration (converted to frames using the input video’s FPS) cannot exceed 505 frames (~21 seconds at 24fps). For higher-FPS inputs, the maximum total duration in seconds will be proportionally lower; for lower-FPS inputs, it will be proportionally higher.

If not provided, defaults to maximize available context within the 505 frame limit while respecting the 20-second cap.

Response

Job submitted successfully
idstring
Unique job identifier. Use this to poll for status.
created_atdatetime
ISO 8601 timestamp of when the job was created.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error