Edit Video Tool
edit_videoEdit an already-uploaded file (a video hashid from create_upload or list_videos)
with one operation: crop, trim, rotate, resize, compress, or mute. This is FREE
and only needs an account, no subscription.
To use a local file: call create_upload, PUT the bytes to the returned upload_url,
then pass that video id here as file. Do NOT call complete_upload (that starts
the paid clip pipeline); this free tool reads the uploaded file directly.
Operation params:
crop:
aspect("1:1"|"9:16"|"16:9"|"4:5") ORx,y,width,height(ints).trim:
start_msandend_ms(ints, required).rotate:
degrees(90|180|270) and/orflip(none|horizontal|vertical).resize:
widthandheight(ints).compress:
target_mb(number) ORcrf(int 18-32).mute: no extra params.
Processing is ASYNCHRONOUS: this returns a tool_job hashid and status: "queued".
Poll get_tool_job_status with that tool_job until it reports completed, then it
returns the downloadable output URL. Free usage is rate-limited per day with per-file
size and duration caps; a clear error explains how to lift a limit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | crop: left offset in pixels. | |
| y | No | crop: top offset in pixels. | |
| crf | No | compress: constant rate factor 18-32 (lower = higher quality). | |
| file | Yes | The uploaded video id (hashid) from create_upload (no complete_upload needed) or list_videos. | |
| flip | No | rotate: none, horizontal or vertical. | |
| width | No | crop/resize: width in pixels. | |
| aspect | No | crop: target aspect "1:1", "9:16", "16:9" or "4:5". Use this OR x/y/width/height. | |
| end_ms | No | trim: end time in milliseconds. | |
| height | No | crop/resize: height in pixels. | |
| degrees | No | rotate: 90, 180 or 270. | |
| start_ms | No | trim: start time in milliseconds. | |
| operation | Yes | One of: crop, trim, rotate, resize, compress, mute. | |
| target_mb | No | compress: target output size in megabytes. |