Resize / change aspect ratio
resize_videoResize video to any resolution or aspect ratio, including presets for social media formats, with cover, contain, blur, or stretch fit modes to handle shape changes.
Instructions
Convert a video to a different resolution or aspect ratio.
Use a named preset for the common targets — 'reel', 'tiktok', 'youtube_short' and 'story' are all 1080x1920; 'youtube_1080p', 'youtube_4k', 'instagram_square' and 'instagram_portrait' do what they say — or give an explicit width and height, or an aspect_ratio such as '9:16'.
'fit' decides what happens to the picture that no longer fits when the shape changes:
cover (default) zooms and crops to fill; nothing is letterboxed but the edges are lost. Use 'focus' to choose which part survives.
contain fits the whole picture inside and pads with solid bars.
blur fits the whole picture inside over a blurred, zoomed copy of itself — the usual look for turning landscape footage vertical.
stretch distorts the picture to fit exactly.
For a talking-head video where the subject must stay in frame, prefer track_and_crop, which follows the face instead of cropping to a fixed point.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | How the picture fills a different shape. 'cover' crops to fill; 'contain' letterboxes with solid bars; 'blur' letterboxes over a blurred zoomed copy of the video; 'stretch' distorts to fit. | cover |
| focus | No | Which part of the picture 'cover' keeps when it has to crop. | center |
| width | No | ||
| encode | No | ||
| height | No | ||
| preset | No | Named target, e.g. 'reel', 'tiktok', 'youtube_short', 'youtube_1080p', 'youtube_4k', 'instagram_square', 'instagram_portrait'. Takes precedence over width/height and aspect_ratio. | |
| input_path | Yes | Path to the source media file. | |
| output_path | No | Destination file. If omitted, the output is written into the job's workspace directory and its path is returned by job_result. | |
| aspect_ratio | No | Target shape such as '9:16', '16:9', '1:1', '4:5'. Combined with a width or height to fix the size; on its own the source's pixel count is preserved. | |
| blur_strength | No | Background blur amount for 'blur'. | |
| background_color | No | Bar colour for 'contain'. | black |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | ||
| job_id | Yes | ||
| status | No | queued | |
| message | No | Job queued. Poll job_status for progress, then job_result. |