# Image Editor

## Links

- Product page URL: https://www.agentpmt.com/marketplace/image-editor
- Product markdown URL: https://www.agentpmt.com/marketplace/image-editor?format=agent-md
- Product JSON URL: https://www.agentpmt.com/marketplace/image-editor?format=agent-json

## Overview

- Product ID: 695c368d767df5adfd9bc86e
- Vendor: Apoth3osis
- Type: core utility
- Unit type: request
- Price: 1000 credits
- Categories: Color & Design Utilities, File & Binary Operations, Marketing
- Generated at: 2026-04-15T18:26:49.374Z

### Page Description

Edit and transform images without any design software. Resize, crop, rotate, blur, invert colors, add borders, draw shapes, overlay text, composite layers, remove backgrounds, and apply shear transforms — all from a single tool. Chain multiple operations together in one request to build complete editing workflows like watermarking, thumbnail generation, or branded graphics. Supports PNG, JPEG, and WebP input and output. Upload an image, provide a URL, or reference a file already in cloud storage, and get your edited result back as a stored file with a shareable link or as inline data ready to use immediately.

### Agent Description

Edit images: blur, crop, resize, rotate, invert colors, composite layers, draw shapes, add text, add borders, shear, and make colors transparent. Chain multiple operations in a single multi_step request. Accepts image via URL, base64, or file_id. Outputs PNG/JPEG/WEBP.

## Details Tab

### Details

Edit and transform images without any design software. Resize, crop, rotate, blur, invert colors, add borders, draw shapes, overlay text, composite layers, remove backgrounds, and apply shear transforms — all from a single tool. Chain multiple operations together in one request to build complete editing workflows like watermarking, thumbnail generation, or branded graphics. Supports PNG, JPEG, and WebP input and output. Upload an image, provide a URL, or reference a file already in cloud storage, and get your edited result back as a stored file with a shareable link or as inline data ready to use immediately.

### Actions

- `blur` (10 credits): Apply Gaussian blur to an image.
- `border` (10 credits): Add a solid-color border around an image.
- `composite` (10 credits): Overlay one image on top of another with optional opacity.
- `create` (10 credits): Create a new blank image canvas with custom dimensions and background color.
- `crop` (10 credits): Crop an image to a rectangular region defined by [left, top, right, bottom] coordinates.
- `draw` (10 credits): Draw shapes (line, rectangle, or ellipse) onto an image.
- `info` (10 credits): Get image dimensions and mode without modifying the image.
- `invert` (10 credits): Invert all colors in an image, producing a photographic negative effect. Each RGB pixel value is replaced with 255 minus its original value. Alpha transparency is preserved.
- `multi_step` (10 credits): Chain multiple image operations together in a single request. Each operation is applied sequentially to the image.
- `resize` (10 credits): Resize an image to specific dimensions or by a scale factor.
- `rotate` (10 credits): Rotate an image by a specified number of degrees (counter-clockwise).
- `shear` (10 credits): Apply an affine shear transformation to an image.
- `text` (10 credits): Draw text onto an image at a specified position with customizable size and color.
- `transparent` (10 credits): Make a specific color transparent in the image. Output as PNG to preserve transparency.

### Use Cases

Generating branded social media graphics by compositing logos onto product images, automating thumbnail creation by resizing and cropping uploaded images to standard dimensions, adding watermarks or copyright text overlays to protect visual content, creating placeholder images with custom colors and dimensions for UI mockups, batch processing profile photos with consistent borders and formatting, applying blur effects to sensitive regions before sharing screenshots, building dynamic certificate or badge generators with text overlays, removing white backgrounds from product images using transparency conversion, preparing images for web optimization by converting formats and resizing for performance, chaining multi-step edits to rotate, crop, resize, and watermark images in a single automated workflow, inverting image colors to create negative versions for dark mode assets or artistic effects, generating high-contrast inverted previews for accessibility testing

### Workflows Using This Tool

No public workflows currently reference this product.

### Related Content

No related content is currently linked to this product.

## Advanced Tab

### DynamicMCP

- Setup page URL: https://www.agentpmt.com/dynamic-mcp
- Claude setup guide: https://www.agentpmt.com/dynamic-mcp?platform=claude#videos
- ChatGPT setup guide: https://www.agentpmt.com/dynamic-mcp?platform=chatgpt#videos
- Cursor setup guide: https://www.agentpmt.com/dynamic-mcp?platform=cursor#videos
- Windsurf setup guide: https://www.agentpmt.com/dynamic-mcp?platform=windsurf#videos

STDIO connector for Claude Code, Codex, Cursor, Zed, and other LLMs that require STDIO or custom connections. This lightweight connector routes requests to `https://api.agentpmt.com/mcp`. All tool execution happens in the cloud and the server cannot edit any files on your computer.

```bash
npm install -g @agentpmt/mcp-router
agentpmt-setup
```

### REST API

The live page renders cURL, Python, JavaScript, and Node.js examples. Logged-in users see those examples prefilled with their own API and budget credentials.

- Purchase endpoint: https://api.agentpmt.com/products/purchase
- Authorization format: `Bearer <base64(apiKey:budgetKey)>`

```bash
curl -X POST "https://api.agentpmt.com/products/purchase" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer eW91ci1hcGkta2V5LWhlcmU6eW91ci1idWRnZXQta2V5LWhlcmU=" \
  -d '{
    "product_id": "695c368d767df5adfd9bc86e",
    "parameters": {
      "action": "blur",
      "output_format": "png",
      "store_file": true,
      "return_base64": false
    }
  }'
```

### Autonomous Agents

Do not use the abbreviated instructions in this product markdown for wallet-based invocation. Retrieve the full External Agent API markdown document instead.

- External Agent API page URL: https://www.agentpmt.com/external-agent-api
- External Agent API markdown URL: https://www.agentpmt.com/external-agent-api?format=agent-md

### Schema

#### Parameters

- Schema type: actions

```json
{
  "actions": {
    "blur": {
      "description": "Apply Gaussian blur to an image.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input (png, jpg, webp).",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image (png, jpg, webp).",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image stored in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Blur parameters. Includes 'radius' (float, default 2.0).",
          "required": false,
          "properties": {
            "radius": {
              "type": "number",
              "description": "Blur radius (higher = more blur).",
              "required": false,
              "default": 2
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output. Defaults to edited.<ext>.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage for file management access.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline when size permits (max 10MB).",
          "required": false,
          "default": false
        }
      }
    },
    "border": {
      "description": "Add a solid-color border around an image.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input (png, jpg, webp).",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image (png, jpg, webp).",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image stored in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Border parameters.",
          "required": false,
          "properties": {
            "size": {
              "type": "integer",
              "description": "Border width in pixels.",
              "required": false,
              "default": 10
            },
            "color": {
              "type": "string",
              "description": "Border color (hex string like '#000000', RGB array, or RGBA array).",
              "required": false,
              "default": "#000000"
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline when size permits.",
          "required": false,
          "default": false
        }
      }
    },
    "composite": {
      "description": "Overlay one image on top of another with optional opacity.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded base image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to the base image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of the base image in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Composite parameters. Provide overlay via overlay_url, overlay_base64, or overlay_file_id.",
          "required": true,
          "properties": {
            "overlay_url": {
              "type": "string",
              "description": "URL of the overlay image.",
              "required": false
            },
            "overlay_base64": {
              "type": "string",
              "description": "Base64-encoded overlay image.",
              "required": false
            },
            "overlay_file_id": {
              "type": "string",
              "description": "File ID of the overlay image.",
              "required": false
            },
            "position": {
              "type": "array",
              "description": "[x, y] position to place the overlay.",
              "required": false,
              "items": {
                "type": "integer"
              },
              "default": [
                0,
                0
              ]
            },
            "opacity": {
              "type": "number",
              "description": "Overlay opacity (0.0 to 1.0).",
              "required": false,
              "default": 1
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    },
    "create": {
      "description": "Create a new blank image canvas with custom dimensions and background color.",
      "properties": {
        "params": {
          "type": "object",
          "description": "Canvas creation parameters.",
          "required": false,
          "properties": {
            "width": {
              "type": "integer",
              "description": "Canvas width in pixels.",
              "required": false,
              "default": 512
            },
            "height": {
              "type": "integer",
              "description": "Canvas height in pixels.",
              "required": false,
              "default": 512
            },
            "color": {
              "type": "string",
              "description": "Fill color (hex string, RGB array, or RGBA array).",
              "required": false,
              "default": "#ffffff"
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    },
    "crop": {
      "description": "Crop an image to a rectangular region defined by [left, top, right, bottom] coordinates.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Crop parameters.",
          "required": true,
          "properties": {
            "box": {
              "type": "array",
              "description": "Crop region as [left, top, right, bottom] in pixels.",
              "required": true,
              "items": {
                "type": "integer"
              }
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    },
    "draw": {
      "description": "Draw shapes (line, rectangle, or ellipse) onto an image.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Draw parameters.",
          "required": true,
          "properties": {
            "shape": {
              "type": "string",
              "description": "Shape type to draw.",
              "required": false,
              "default": "line",
              "enum": [
                "line",
                "rectangle",
                "ellipse"
              ]
            },
            "coordinates": {
              "type": "array",
              "description": "Coordinate pairs (e.g., [x1, y1, x2, y2]).",
              "required": true,
              "items": {
                "type": "integer"
              }
            },
            "fill": {
              "type": "string",
              "description": "Fill color (hex, RGB, or RGBA).",
              "required": false,
              "default": "#000000"
            },
            "outline": {
              "type": "string",
              "description": "Outline color for rectangle and ellipse.",
              "required": false,
              "default": "#000000"
            },
            "width": {
              "type": "integer",
              "description": "Line/outline width in pixels.",
              "required": false,
              "default": 1
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    },
    "info": {
      "description": "Get image dimensions and mode without modifying the image.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image in cloud storage.",
          "required": false
        }
      }
    },
    "invert": {
      "description": "Invert all colors in an image, producing a photographic negative effect. Each RGB pixel value is replaced with 255 minus its original value. Alpha transparency is preserved.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input (png, jpg, webp).",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image (png, jpg, webp).",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image stored in cloud storage.",
          "required": false
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output. Defaults to edited.<ext>.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage for file management access.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline when size permits (max 10MB).",
          "required": false,
          "default": false
        }
      }
    },
    "multi_step": {
      "description": "Chain multiple image operations together in a single request. Each operation is applied sequentially to the image.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image in cloud storage.",
          "required": false
        },
        "operations": {
          "type": "array",
          "description": "List of operations to apply sequentially. Each object has 'action' (string) and 'params' (object).",
          "required": true,
          "items": {
            "type": "object",
            "properties": {
              "action": {
                "type": "string",
                "description": "Operation to perform: blur, border, composite, create, crop, draw, invert, resize, rotate, shear, text, transparent.",
                "required": true
              },
              "params": {
                "type": "object",
                "description": "Parameters for this operation.",
                "required": false
              }
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    },
    "resize": {
      "description": "Resize an image to specific dimensions or by a scale factor.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Resize parameters. Provide width+height or scale.",
          "required": true,
          "properties": {
            "width": {
              "type": "integer",
              "description": "Target width in pixels.",
              "required": false
            },
            "height": {
              "type": "integer",
              "description": "Target height in pixels.",
              "required": false
            },
            "scale": {
              "type": "number",
              "description": "Scale factor (e.g., 0.5 for half size, 2.0 for double).",
              "required": false
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    },
    "rotate": {
      "description": "Rotate an image by a specified number of degrees (counter-clockwise).",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Rotation parameters.",
          "required": false,
          "properties": {
            "degrees": {
              "type": "number",
              "description": "Rotation angle in degrees (counter-clockwise).",
              "required": false,
              "default": 0
            },
            "expand": {
              "type": "boolean",
              "description": "Expand canvas to fit rotated image.",
              "required": false,
              "default": true
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    },
    "shear": {
      "description": "Apply an affine shear transformation to an image.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Shear parameters.",
          "required": false,
          "properties": {
            "x": {
              "type": "number",
              "description": "Horizontal shear factor.",
              "required": false,
              "default": 0
            },
            "y": {
              "type": "number",
              "description": "Vertical shear factor.",
              "required": false,
              "default": 0
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    },
    "text": {
      "description": "Draw text onto an image at a specified position with customizable size and color.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Text parameters.",
          "required": true,
          "properties": {
            "text": {
              "type": "string",
              "description": "The text content to draw on the image.",
              "required": true
            },
            "x": {
              "type": "integer",
              "description": "X position in pixels.",
              "required": false,
              "default": 0
            },
            "y": {
              "type": "integer",
              "description": "Y position in pixels.",
              "required": false,
              "default": 0
            },
            "size": {
              "type": "integer",
              "description": "Font size.",
              "required": false,
              "default": 20
            },
            "color": {
              "type": "string",
              "description": "Text color (hex, RGB, or RGBA).",
              "required": false,
              "default": "#000000"
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    },
    "transparent": {
      "description": "Make a specific color transparent in the image. Output as PNG to preserve transparency.",
      "properties": {
        "image_base64": {
          "type": "string",
          "description": "Base64-encoded image input.",
          "required": false
        },
        "image_url": {
          "type": "string",
          "description": "Public URL to an image.",
          "required": false
        },
        "file_id": {
          "type": "string",
          "description": "File ID of an image in cloud storage.",
          "required": false
        },
        "params": {
          "type": "object",
          "description": "Transparency parameters.",
          "required": false,
          "properties": {
            "color": {
              "type": "string",
              "description": "The color to make transparent (hex string, RGB array, or RGBA array).",
              "required": false,
              "default": "#ffffff"
            }
          }
        },
        "output_format": {
          "type": "string",
          "description": "Output image format. Use 'png' to preserve transparency.",
          "required": false,
          "default": "png",
          "enum": [
            "png",
            "jpeg",
            "webp"
          ]
        },
        "filename": {
          "type": "string",
          "description": "Filename for stored output.",
          "required": false
        },
        "store_file": {
          "type": "boolean",
          "description": "Store output in cloud storage.",
          "required": false,
          "default": true
        },
        "return_base64": {
          "type": "boolean",
          "description": "Return base64 output inline.",
          "required": false,
          "default": false
        }
      }
    }
  }
}
```

### Usage Instructions

# Image Editor - Instructions

## Overview
The Image Editor tool provides programmatic image manipulation capabilities including resizing, cropping, rotating, drawing shapes, adding text, compositing layers, applying blur effects, adding borders, creating transparent regions, inverting colors, and more. Operations can be chained together using multi_step mode.

## Image Input
Every action (except `create`) requires an image input via one of:
- **image_url** - Public URL to a PNG, JPG, or WebP image
- **image_base64** - Base64-encoded image data
- **file_id** - File ID from cloud storage (from a previous upload or edit)

## Common Output Options
| Parameter | Type | Default | Description |
|-----------|------|---------|-------------|
| output_format | string | `"png"` | Output format: `png`, `jpeg`, or `webp` |
| filename | string | `"edited.<ext>"` | Filename for the stored output |
| store_file | boolean | `true` | Store the result in cloud storage (returns file_id and signed_url) |
| return_base64 | boolean | `false` | Also return the image as inline base64 (max 10 MB) |

---

## Actions

### info
Get image dimensions and mode without modifying it.

**Required:** An image input (image_url, image_base64, or file_id)
**Optional params:** None

**Example:**
```json
{
  "action": "info",
  "image_url": "https://example.com/photo.png"
}
```

---

### create
Create a new blank image canvas.

**Required:** None (defaults apply)
**Optional params:**
| Param | Type | Default | Description |
|-------|------|---------|-------------|
| width | integer | 512 | Canvas width in pixels |
| height | integer | 512 | Canvas height in pixels |
| color | string/array | `"#ffffff"` | Fill color (hex string, RGB array, or RGBA array) |

**Example:**
```json
{
  "action": "create",
  "params": { "width": 800, "height": 600, "color": "#ff0000" }
}
```

---

### resize
Resize an image to specific dimensions or by a scale factor.

**Required:** An image input + either `width`/`height` or `scale` in params
**Optional params:**
| Param | Type | Description |
|-------|------|-------------|
| width | integer | Target width in pixels |
| height | integer | Target height in pixels |
| scale | float | Scale factor (e.g., 0.5 for half size, 2.0 for double) |

**Example (explicit dimensions):**
```json
{
  "action": "resize",
  "image_url": "https://example.com/photo.png",
  "params": { "width": 256, "height": 256 }
}
```

**Example (scale factor):**
```json
{
  "action": "resize",
  "file_id": "abc123",
  "params": { "scale": 0.5 }
}
```

---

### crop
Crop an image to a rectangular region.

**Required:** An image input + `box` in params
**Optional params:** None beyond the required box
| Param | Type | Description |
|-------|------|-------------|
| box | array of 4 ints | Crop region as `[left, top, right, bottom]` in pixels |

**Example:**
```json
{
  "action": "crop",
  "image_url": "https://example.com/photo.png",
  "params": { "box": [50, 50, 300, 300] }
}
```

---

### rotate
Rotate an image by a specified number of degrees.

**Required:** An image input
**Optional params:**
| Param | Type | Default | Description |
|-------|------|---------|-------------|
| degrees | float | 0 | Rotation angle in degrees (counter-clockwise) |
| expand | boolean | true | Expand canvas to fit rotated image |

**Example:**
```json
{
  "action": "rotate",
  "image_url": "https://example.com/photo.png",
  "params": { "degrees": 90 }
}
```

---

### blur
Apply Gaussian blur to an image.

**Required:** An image input
**Optional params:**
| Param | Type | Default | Description |
|-------|------|---------|-------------|
| radius | float | 2.0 | Blur radius (higher = more blur) |

**Example:**
```json
{
  "action": "blur",
  "file_id": "abc123",
  "params": { "radius": 5.0 }
}
```

---

### border
Add a solid-color border around an image.

**Required:** An image input
**Optional params:**
| Param | Type | Default | Description |
|-------|------|---------|-------------|
| size | integer | 10 | Border width in pixels |
| color | string/array | `"#000000"` | Border color |

**Example:**
```json
{
  "action": "border",
  "image_url": "https://example.com/photo.png",
  "params": { "size": 20, "color": "#0000ff" }
}
```

---

### invert
Invert all colors in an image, producing a photographic negative effect. Each RGB pixel value is replaced with 255 minus its original value. Alpha transparency is preserved on RGBA images.

**Required:** An image input (image_url, image_base64, or file_id)
**Optional params:** None

**Example:**
```json
{
  "action": "invert",
  "image_url": "https://example.com/photo.png"
}
```

**Example (with file_id):**
```json
{
  "action": "invert",
  "file_id": "abc123",
  "output_format": "png",
  "store_file": true
}
```

---

### text
Draw text onto an image.

**Required:** An image input + `text` in params
**Optional params:**
| Param | Type | Default | Description |
|-------|------|---------|-------------|
| text | string | *(required)* | The text to draw |
| x | integer | 0 | X position in pixels |
| y | integer | 0 | Y position in pixels |
| size | integer | 20 | Font size |
| color | string/array | `"#000000"` | Text color |

**Example:**
```json
{
  "action": "text",
  "image_url": "https://example.com/photo.png",
  "params": { "text": "Hello World", "x": 50, "y": 100, "size": 36, "color": "#ffffff" }
}
```

---

### draw
Draw shapes (line, rectangle, or ellipse) onto an image.

**Required:** An image input + `coordinates` in params
**Optional params:**
| Param | Type | Default | Description |
|-------|------|---------|-------------|
| shape | string | `"line"` | Shape type: `line`, `rectangle`, or `ellipse` |
| coordinates | array | *(required)* | Coordinate pairs (e.g., `[x1, y1, x2, y2]`) |
| fill | string/array | `"#000000"` | Fill color |
| outline | string/array | `"#000000"` | Outline color (rectangle and ellipse) |
| width | integer | 1 | Line/outline width in pixels |

**Example (rectangle):**
```json
{
  "action": "draw",
  "image_url": "https://example.com/photo.png",
  "params": {
    "shape": "rectangle",
    "coordinates": [10, 10, 200, 150],
    "fill": "#ff000080",
    "outline": "#ff0000",
    "width": 3
  }
}
```

---

### composite
Overlay one image on top of another with optional opacity.

**Required:** An image input (the base) + an overlay image via one of: `overlay_url`, `overlay_base64`, or `overlay_file_id` in params
**Optional params:**
| Param | Type | Default | Description |
|-------|------|---------|-------------|
| overlay_url | string | — | URL of the overlay image |
| overlay_base64 | string | — | Base64-encoded overlay image |
| overlay_file_id | string | — | File ID of the overlay image |
| position | array | `[0, 0]` | `[x, y]` position to place the overlay |
| opacity | float | 1.0 | Overlay opacity (0.0 to 1.0) |

**Example:**
```json
{
  "action": "composite",
  "image_url": "https://example.com/background.png",
  "params": {
    "overlay_url": "https://example.com/logo.png",
    "position": [50, 50],
    "opacity": 0.8
  }
}
```

---

### shear
Apply an affine shear transformation to an image.

**Required:** An image input
**Optional params:**
| Param | Type | Default | Description |
|-------|------|---------|-------------|
| x | float | 0 | Horizontal shear factor |
| y | float | 0 | Vertical shear factor |

**Example:**
```json
{
  "action": "shear",
  "image_url": "https://example.com/photo.png",
  "params": { "x": 0.3, "y": 0.0 }
}
```

---

### transparent
Make a specific color transparent in the image.

**Required:** An image input
**Optional params:**
| Param | Type | Default | Description |
|-------|------|---------|-------------|
| color | string/array | `"#ffffff"` | The color to make transparent |

**Example:**
```json
{
  "action": "transparent",
  "image_url": "https://example.com/icon.png",
  "params": { "color": "#ffffff" },
  "output_format": "png"
}
```

---

### multi_step
Chain multiple operations together in a single request. Each operation is applied sequentially.

**Required:** An image input (or use a `create` operation first) + `operations` array
**operations** is an array of objects, each with:
| Field | Type | Description |
|-------|------|-------------|
| action | string | Any single action listed above (not `multi_step` or `info`) |
| params | object | Parameters for that action |

**Example:**
```json
{
  "action": "multi_step",
  "image_url": "https://example.com/photo.png",
  "operations": [
    { "action": "resize", "params": { "width": 400, "height": 300 } },
    { "action": "invert", "params": {} },
    { "action": "border", "params": { "size": 5, "color": "#333333" } },
    { "action": "text", "params": { "text": "Inverted", "x": 10, "y": 10, "color": "#ffffff" } }
  ],
  "output_format": "jpeg",
  "filename": "processed.jpg"
}
```

---

## Color Format
Colors can be specified as:
- Hex string: `"#RRGGBB"` or `"#RRGGBBAA"`
- RGB array: `[255, 0, 0]`
- RGBA array: `[255, 0, 0, 128]`
- Comma-separated string: `"255,0,0"` or `"255,0,0,128"`

## Common Workflows

1. **Resize and watermark:** Use `multi_step` with `resize` then `text` to add a watermark label.
2. **Create branded image:** Use `create` to make a canvas, then `multi_step` with `composite` to overlay a logo and `text` for copy.
3. **Thumbnail generation:** Use `resize` with a `scale` factor or explicit small dimensions, output as `jpeg` for smaller file size.
4. **Remove white background:** Use `transparent` with `color: "#ffffff"` and output as `png` to preserve transparency.
5. **Annotate a screenshot:** Use `multi_step` with `draw` (rectangles for highlights) and `text` (labels).
6. **Create dark mode variant:** Use `invert` to flip all colors, useful for generating negative versions of light-themed assets.
7. **Accessibility contrast check:** Use `invert` to preview how content reads with reversed colors.

## Important Notes
- Output is stored in cloud storage by default (store_file=true) and returns a `file_id` and `signed_url`.
- Use `file_id` from a previous result as input for follow-up edits.
- The `info` action returns dimensions and mode without producing an output image.
- The `create` action does not require any image input.
- For `multi_step`, operations are applied in order; each step modifies the image from the previous step.
- Inline base64 output (return_base64=true) is limited to 10 MB.
- Stored files expire after 7 days.

### About The Developer

- Vendor name: Apoth3osis
- Website: apoth3osis.io

We build tools that enable AI agents to excel in the mathematical realm.

Our small team develops experimental and unique solutions in the AI arena, with a strong focus on modular computing for agentic applications and custom model deployment. We have handled projects for a variety of applications across many sectors, from algorithmic trading and financial analysis, to molecular simulations and predictions, to habitat and biodiversity monitoring and wildlife conservation.

### Frequently Asked Questions

No linked FAQs are currently available.

### Dependencies

These products are automatically added when this product is enabled on the page UI.

#### File Management

Upload, list, retrieve, share, download, delete, and manage files stored in AgentPMT cloud storage. This product now owns the full file lifecycle, including signed upload URLs for files up to 10MB and for files over 10MB up to 100MB, budget-scoped file listing with preview URLs, fresh signed download URLs, direct base64 download for smaller files, password-protected sharing, metadata and tag updates, access-history inspection, and expiration extension. All file operations are scoped to the current budget for isolation and are designed to let one budget create persistent files that can be revisited across later agent runs.

- Page URL: https://www.agentpmt.com/marketplace/file-management
- Markdown URL: https://www.agentpmt.com/marketplace/file-management?format=agent-md