Media
Image Editor
Comprehensive image editing tool for AI agents. Draw shapes (rectangles, circles, lines, polygons, arrows), add text with auto-sizing to fit regions, crop, resize, rotate, flip images. Text can automatically calculate optimal font size to fit within bounding boxes. Supports batch operations in a single call for complex image compositions. Returns URL to the edited image.
Category: Media · Plans: Trial, Pro, Premium, Enterprise · Type: ImageEditor
Inputs#
| Field | Type | Required | Default | What it does |
|---|---|---|---|---|
| Image URL | Text | Yes | (empty) | URL to the image to edit. |
| Operations (JSON) | Text | Yes | (empty) | JSON array of editing operations. Each operation is a dict with “type” field. Example: [{“type”:“rectangle”,“x”:100,“y”:100,“width”:200,“height”:150,“color”:“red”},{“type”:“text”,“x”:110,“y”:95,“text”:“Label”,“color”:“white”}] |
| Output Format | Text | No | jpg | Image output format. Options: jpg, png, webp (Advanced) |
| Quality | Number | No | 90 | Output quality for JPG/WebP formats (1-100). Higher = better quality but larger file size. (Advanced) |
Outputs#
| Output | Type |
|---|---|
| Image Url | Text |
| File Id | Text |
| File Name | Text |
| Operations Applied | Number |
| Operations Failed | Number |
| Image Width | Number |
| Image Height | Number |
| Status | Text |
| Error | Any |
Use as an agent tool#
Tool name: imageeditor
Edit images with drawing, text, and manipulation operations. Accepts a JSON array of operations to execute in sequence. Supports: - Shapes: rectangle, circle, ellipse, line, polyline, arrow, polygon - Text: manual positioning OR auto-sizing (calculates optimal font to fit bbox) - Text alignment: horizontal (left/center/right) and vertical (top/middle/bottom) - Transformations: crop, resize, rotate, flip - Colors: hex (#FF0000), RGB arrays [255,0,0], or named colors (red, blue, etc.) Returns URL to the edited image and operation statistics.