About this endpoint
What it does
Trims a segment from an uploaded video file and streams the resulting download back as a binary response. You can optionally set the clip start time, clip duration, and output scale.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| video | String | Yes | Video file upload. Accepted formats: .mp4, .mkv, .avi, .mov, .flv, .3gp, .webm. Maximum size: 500 MiB. |
| duration | Integer | No | Clip length in seconds. Default: 2. Minimum: 1, maximum: 20. |
| start_time | Integer | No | Start time in seconds from the beginning of the source video. Default: 0. Minimum: 0. |
| size | String | No | Output scale in WxH format. Width and height must be even numbers. Omit to keep the source dimensions. Example: 640x360. |
Response
Returns a binary file stream, represented in the schema as a string with format: binary.
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| binary response | String | Yes | The generated trimmed video is returned as a binary download. |