edit_image
Edit an image with natural language instructions. Uses MAI-Image-2.6, ranked #3 on the Artificial Analysis image-editing leaderboard as of September 2026 — understands context, handles object addition/removal, style transfer, and inpainting. Returns JSON with image URL. 200 sats per edit, one flat price. Pay per request with Bitcoin Lightning — no API key or signup needed. Requires create_payment with toolName='edit_image'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Editing instructions describing what to change | |
| paymentId | Yes | Valid payment ID (must be paid) | |
| resolution | No | Ignored: MAI-Image-2.6 has no resolution setting. Accepted for compatibility; every edit is 200 sats. | 1K |
| aspectRatio | No | Output aspect ratio (default: match_input_image, which keeps the input's shape) | match_input_image |
| imageBase64 | Yes | Base64 encoded image to edit | |
| outputFormat | No | Output format | jpg |
| returnBase64 | No | Also return the edited image as a base64 data URL (base64Image). Default false: imageUrl is the deliverable and the base64 copy is megabytes of context. |