Skip to main content
Glama

Inpaint / outpaint an image with a mask

replicate_inpaint

Replace 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

TableJSON Schema
NameRequiredDescriptionDefault
maskYesURL of the mask. White areas are kept; black/transparent areas are inpainted.
imageYesURL of the source image.
modelNoInpaint model. Curated: flux-fill-pro, sd-inpaint, ideogram-v2-edit. Or "owner/name".flux-fill-pro
promptYesText describing what to paint in the masked area.
downloadNo
timeout_msNoMax ms to wait for the prediction. If exceeded, returns the prediction ID so you can poll via replicate_get_prediction. Default: 300000 (5min).
extra_inputNo
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate non-read-only and non-destructive nature. The description adds context about display requirements (embed result inline) but does not disclose other behavioral traits like rate limits, auth needs, or failure modes. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is structured with two paragraphs and a bullet list, front-loading the purpose. It could be slightly more concise (e.g., timeout explanation is verbose), but overall effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Missing output schema means the description should clarify return format; it only mentions display requirements. With 7 parameters and 71% schema coverage, the description covers key ones but leaves gaps (e.g., no error handling or polling details for timeout).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 71%, and the description adds meaningful context beyond the schema, such as clarifying mask semantics (white=keep, black=repaint) and model examples (flux-fill-pro). However, it omits details on timeout_ms and download, which are in the schema but not reinforced.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fill masked regions of an image based on a text prompt' and distinguishes between inpainting and outpainting, making the tool's purpose specific and differentiated from sibling image tools like replicate_generate_image or replicate_remove_background.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs alternatives (e.g., replicate_generate_image for full image generation). The description implies use for inpainting/outpainting but lacks 'when not to use' or references to other tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sena-labs/replicate-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server