Edit an image
edit_imageModify an existing image in place using a plain-language instruction while preserving composition, aspect ratio, and untouched text. Supports removing text or objects.
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. When the saved brand has a product photo and the ad shows that product, the photo rides with the edit and the product's label is read and checked against it: re-printed from the photo only when it came out wrong (the check alone is charged when it is right; one small extra charge finds the product first). fixLabel:false turns that off. 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 | |
| dryRun | No | true = return the exact credits this edit reserves and render nothing | |
| 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 | |
| fixLabel | No | false = leave the product label exactly as rendered: no product lookup, no label check, no re-print (default on when the ad shows the brand’s saved product) | |
| instruction | Yes | the change to make, in plain words (pass the user’s own words for a removal or plain photo edit) |