Inpaint / outpaint an image with a mask
replicate_inpaintReplace or extend image regions by describing the desired content in text. Provide a source image, a mask marking the area to repaint, and a prompt—the tool fills the masked area accordingly.
Instructions
Fill masked regions of an image based on a text prompt. Works for both inpainting (replace inside) and outpainting (extend canvas) when the mask covers the target area.
DISPLAY REQUIREMENT — embed the result inline using one of the three blocks (iframe / / markdown) printed by the tool.
Args:
image (URL): Source image.
mask (URL): Mask image. White = keep, black/transparent = repaint.
prompt: Describes what should appear in the masked region.
model (default "flux-fill-pro"): Curated (flux-fill-pro, sd-inpaint, ideogram-v2-edit) or "owner/name".
extra_input (object, optional): Model-specific extras (e.g. {guidance: 30} for flux-fill-pro).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | Yes | URL of the mask. White areas are kept; black/transparent areas are inpainted. | |
| image | Yes | URL of the source image. | |
| model | No | Inpaint model. Curated: flux-fill-pro, sd-inpaint, ideogram-v2-edit. Or "owner/name". | flux-fill-pro |
| prompt | Yes | Text describing what to paint in the masked area. | |
| download | No | ||
| timeout_ms | No | Max ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min). | |
| extra_input | No |