inpaint_image
Edit specific image regions by regenerating masked areas based on text prompts to modify or remove objects.
Instructions
Edit specific regions of an image using a mask. White areas in the mask will be regenerated based on the prompt.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"image_url": "<image_url>",
"mask_url": "<mask_url>",
"prompt": "<prompt>"
},
"name": "inpaint_image"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image_url | Yes | URL of the source image (use upload_file for local images) | |
| mask_url | Yes | URL of the mask image (white=edit, black=keep). Use upload_file for local masks. | |
| prompt | Yes | What to generate in the masked area (e.g., 'a red sports car', 'green grass') | |
| model | No | Inpainting model. Options: fal-ai/flux-kontext-lora/inpaint, fal-ai/flux-krea-lora/inpainting | fal-ai/flux-kontext-lora/inpaint |
| negative_prompt | No | What to avoid in the generated area | |
| seed | No | Seed for reproducible results |