Edit an image
edit_imageEdit an existing image with a plain-language instruction, preserving untouched content. Remove text or objects, or target a region with a mask.
Instructions
EDIT an existing image in place with a plain-language instruction and keep everything else: 'make the headline bigger', 'add our logo bottom right', 'swap the background for a kitchen', 'remove the person on the left', 'erase all the text'. Pass image (URL, Library item, upload_file URL or local path) and instruction. The same edit the web Studio's Edit runs: composition, aspect ratio, people and every untouched line of text stay as they are; the saved brand's real name and website are pinned so an added line never invents one, and the brand's real logo is attached when the instruction asks for the logo. Set removal:true when the edit STRIPS text, branding or an object, so nothing branded is put back. For a precise region, pass mask (see generate_image). One image edit's credits; returns the new image URL. For a new image from a prompt use generate_image; to rebuild a competitor's ad for your brand use clone_static.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | No | optional mask image (URL or local path) marking the region to change: transparent = change, or white = change on an opaque mask | |
| image | Yes | the image to edit: URL, Library item URL, upload_file URL or local path | |
| removal | No | true when the edit REMOVES text, branding, a logo, a watermark, a person or an object, so the brand name and logo are not re-added | |
| instruction | Yes | the change to make, in plain words (pass the user’s own words for a removal or plain photo edit) |