Compress to a target size
compress_mediaShrink a video or audio file to fit a size limit, such as 8 MB for Discord or 25 MB for email. Picks the bitrate for you and re-encodes once more if the first attempt lands over the limit. Cost: 1 credit per minute of output. Long jobs return a job_id; poll it with get_job. Result links expire in 1 hour.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Source file: public http(s) link | |
| format | No | Defaults to mp4 for video and mp3 for audio | |
| max_height | No | Shrink video to at most this height, e.g. 720 | |
| start_seconds | No | Start time in seconds | |
| target_size_mb | Yes | Largest allowed file size in MB | |
| duration_seconds | No | Length of the result in seconds |