Snap a mask
ideogram_snap_maskSnap a hand-drawn mask to the object it marks and save a PNG binary mask. Use white for removal or edits; invert for inpainting.
Instructions
Snap a hand-drawn binary mask to the object it marks: the snapped mask comes back as a PNG (white = the object), saved to the output directory. Use it as is for ideogram_remove_object (white = the region to remove) and for the colorways and material swap masks (white = the region to change); invert it for ideogram_inpaint, whose mask takes black as the region to repaint. The image and the mask as local files or public https URLs. No price quote (the v1 operation offers no dry run).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | No | The hand-drawn mask, a local file or a public https URL, the image's size: white (≥ 128) marks the object to snap to | |
| image | No | The image containing the object, a local file or a public https URL | |
| inline_images | No | true: each saved image is also returned as image content (base64; one over 3.75 MB, or past 10 MB in total, by path only), for a client without file access |