Retake video section

Edit a specific section of a video by replacing audio, video, or both using AI generation.

The edited section is defined by the start_time and duration parameters.

Authentication

AuthorizationBearer
API key authentication

Request

This endpoint expects an object.
video_uristringRequired
Input video in either an HTTPS URL format or base64 data URI format. See [Input Formats](/input-formats#video-input) for supported formats and codecs. - Maximum resolution: 3840x2160 (4K) - Maximum duration: 20 seconds - Frame count: minimum 73 (around 3 seconds in 24fps), maximum 505 (around 21 seconds in 24fps)
start_timedoubleRequired>=0

Start time in seconds, defines the section to be edited in the input video.

The section defined by start_time and duration should be within the duration of the input video. If the section extends beyond the duration of the video, it will be clamped to the video duration.

durationdoubleRequired>=2

Duration in seconds, defines the duration of the section to be edited in the input video. Must be at least 2 seconds.

The section defined by start_time and duration should be within the duration of the input video. If the section extends beyond the duration of the video, it will be clamped to the video duration.

promptstringOptional<=5000 characters

Describing what needs to happen in the generated video in a section defined by start_time and duration.

modeenumOptionalDefaults to replace_audio_and_video
Can be any of the following: - `replace_audio` - Replace only the audio track - `replace_video` - Replace only the video track - `replace_audio_and_video` - Replace both audio and video tracks The default value is `replace_audio_and_video` if not specified.
Allowed values:

Response

Video edited successfully

Errors