midjourney_edit
Edit existing images using AI prompts. Optionally apply a mask to modify specific regions while preserving the rest.
Instructions
Edit an existing image using Midjourney.
This allows you to modify an existing image based on a text prompt,
optionally using a mask to specify which regions to edit.
Use this when:
- You want to modify an existing image with AI
- You want to add or change elements in an image
- You want to apply style changes to an image
- You need to edit specific regions using a mask
For masks:
- White areas in the mask indicate regions to regenerate
- Black areas will be preserved from the original
Returns:
Task ID and edited image information including URLs and dimensions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image_url | Yes | URL of the image to edit. Must be a direct image URL (not a web page). | |
| prompt | Yes | Description of how to edit the image. Examples: 'A cat sitting on a table', 'Add a sunset in the background', 'Make it look like a watercolor painting' | |
| mode | No | Generation mode. 'fast' is recommended. | fast |
| split_images | No | If true, split the result into separate images returned via sub_image_urls. | |
| mask | No | Optional Base64-encoded mask image. White areas indicate regions to edit and regenerate. | |
| callback_url | No | Webhook callback URL for asynchronous notifications. When provided, the API will call this URL when the edit is complete. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |