edit_image
Edit an existing image from a local file with natural language instructions: add elements, change backgrounds, alter style, and save the result to a specified path.
Instructions
Edits or transforms an existing image from a local file and natural language instructions (add elements, change backgrounds, alter style, etc.).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | OpenRouter model to use. Default: 'google/gemini-3.1-flash-image'. | |
| prompt | Yes | Instructions on what to modify or add to the reference image. | |
| image_path | Yes | Local path to the base image (e.g., './assets/logo.png') or base64 Data URL. | |
| output_path | No | File path to save the resulting image. If omitted, automatically saves to the default folder. | |
| aspect_ratio | No | Desired aspect ratio for the edited image. | |
| output_format | No | Saved file format ('png', 'webp', 'jpeg'). |