midjourney_edit
Edit existing images with text prompts to add, remove, or change elements, or apply new styles. Use an optional mask to target specific regions for precise edits.
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 |
|---|---|---|---|
| mask | No | Optional Base64-encoded mask image. White areas indicate regions to edit and regenerate. | |
| mode | No | Generation mode. 'fast' is recommended. | fast |
| 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' | |
| image_url | Yes | URL of the image to edit. Must be a direct image URL (not a web page). | |
| callback_url | No | Webhook callback URL for asynchronous notifications. When provided, the API will call this URL when the edit is complete. | |
| split_images | No | If true, split the result into separate images returned via sub_image_urls. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |