Skill 3.1.3

Configure image-editing workflows, including inpainting, mask-based edits, and prompt-driven modifications

Key Concepts

Prompt-driven modifications pass an image and an instruction such as "Change the background to a beach at sunset" to images.edit; the model may alter any part of the image. Mask-based edits (inpainting) add a mask: a PNG with the same dimensions as the image, in which fully transparent pixels mark the area to regenerate and opaque pixels mark the area to keep. Inpainting suits replacing an object, removing a blemish or filling a region.

Workflows combine these steps: generate a base image, let a user select a region in the interface, create the mask from the selection, and edit only that region. The input fidelity setting on GPT-image models controls how closely details from the input images, such as faces and logos, are preserved. Each edit is a new image, so the application keeps the history for undo and provenance.