Compose 2-16 video clips into one split-screen video using the shared collage layout library. This endpoint performs layout and rendering only. It does not run face tracking, speaker detection, or person selection.
The same file_id may appear more than once in clips, with a different crop for each entry. This allows one source video to provide multiple simultaneous views.
Choosing a Layout Mode
Mode
Best For
Behavior
auto
Recommended default when the client does not maintain template IDs
Selects a reviewed template from the clip count, source aspects, and requested output ratio, then returns the effective layout_id and random_seed
template
Fixed designs and reproducing a previous task
Uses the specified layout_id; its slot count must match the number of clips
To lock an automatically selected result, first run with auto, save layout.layout_id, and use that ID in a later template request. random_seed reproduces spatial variants considered by auto mode. Changing clip count, crops, or output ratio may still change the selected layout even when the seed is unchanged.
layout_id Catalog
The catalog below covers 2-16 slots and shows the actual geometry for 1:1, 16:9, and 9:16 outputs. Select a ratio, then click any image to enlarge it and identify the required layout_id.
Choose an output ratio to inspect its layouts. Click any image to enlarge it.
Create Task
Basic Information
Item
Value
Method
POST
Path
/task/video_split_screen
Content-Type
application/json
Authentication
API Key passed directly in the Authorization header
Billing
Based on the shortest selected clip duration
Request Parameters
Parameter
Type
Required
Default
Description
clips
array
Yes
—
2-16 video clip entries
layout_mode
string
No
auto
auto selects a layout; template uses an explicit layout
layout_id
integer
Conditional
—
Required in template mode; slot count must equal the number of clips
random_seed
integer
No
Task-derived
0-2147483647; reproduces random spatial variants within a crop-equivalent layout group
output_ratio
string
No
9:16
9:16, 16:9, or 1:1
quality
string
No
1080p
720p or 1080p
fit_mode
string
No
cover
cover fills and center-crops; contain preserves the full image with padding
duration_mode
string
No
shortest
V1 only supports shortest
audio_mode
string
No
first
first, mix, or mute
gap_ratio
number
No
0.008
Gap as a canvas ratio, from 0 to 0.05
background_color
string
No
#000000
Background color in #RRGGBB format
Output Dimensions
output_ratio
720p
1080p
9:16
720 × 1280
1080 × 1920
16:9
1280 × 720
1920 × 1080
1:1
720 × 720
1080 × 1080
Clip Entry
Field
Type
Required
Default
Description
file_id
string
Yes
—
Uploaded video file ID; it may be repeated in other entries
begin_time_ms
integer
No
0
Selected range start in milliseconds
end_time_ms
integer
No
Source end
Selected range end; zero or omitted means source end
crop is normalized against the source video: (0,0) is the top-left corner and (1,1) is the bottom-right corner. For example, the left half is {"x":0,"y":0,"width":0.5,"height":1}. This crop is applied before fit_mode; with cover, the service may crop further inside that region to fill the destination slot.
Audio Modes
Value
Behavior
first
Uses the first available audio stream in clip order; emits no audio if all clips are silent
mix
Mixes every available clip audio stream without extending the shortest output duration