Edit image
edit_imageEdit an uploaded image: rotate, flip, crop (pixels or aspect ratio), resize (width/height, percent, megapixels), grayscale (black & white), sepia, brightness, contrast, warm, cool, invert, blur, sharpen — applied in order. Optionally change the format (jpeg/png/webp) or make the file at most max_kb kilobytes (1 KB = 1,000 bytes). Creates a NEW image with its own page_url, image_url and download_url; the original stays unchanged.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"id": "<id>"
},
"name": "edit_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Image id returned by upload_image or edit_image (e.g. "vqSvesFU") | |
| format | No | Output format: jpeg, png or webp. If omitted, the new image keeps the original format (a GIF becomes png). jpeg has no transparency: transparent areas turn white. | |
| max_kb | No | Largest file size in KB, 1 KB = 1,000 bytes (jpeg/webp) | |
| quality | No | JPEG/WebP quality, 1–100 (default 90). png ignores it (lossless). With max_kb, the highest quality tried. | |
| filename | No | Optional file name for the new image, e.g. "beach-small.jpg". Its extension is set to match the output format. If omitted: the original name + "-edited". | |
| operations | No | Example: [{"op":"rotate","degrees":90},{"op":"resize","width":1080},{"op":"grayscale"}] | |
| return_preview | No | Also return a small preview of the image so you can look at it (default false) |