Edit Image Tool
edit_imageEdit an already-uploaded image file (a hashid from create_upload) with one
operation: compress, resize, or crop. 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 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:
compress:
quality(int 1-100, default 80) andformat(jpg|png|webp, default jpg).resize:
widthandheight(ints), optionalformat.crop:
aspect("1:1"|"9:16"|"16:9"|"4:5") ORx,y,width,height(ints), optionalformat.
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 a per-file
size cap; 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. | |
| file | Yes | The uploaded image id (hashid) from create_upload (no complete_upload needed). | |
| width | No | resize/crop: width in pixels. | |
| aspect | No | crop: target aspect "1:1", "9:16", "16:9" or "4:5". Use this OR x/y/width/height. | |
| format | No | Output format: jpg, png or webp (default jpg). | |
| height | No | resize/crop: height in pixels. | |
| quality | No | compress: output quality 1-100 (default 80). | |
| operation | Yes | One of: compress, resize, crop. |