Media · Image · Generative fill / inpaint with prompt
Fill a masked region of an image with AI-generated content described
by prompt. Requires a mask (mask_url or mask_base64) marking WHERE
to fill. Use this when you have a specific region to replace; for removing
an object by description (no mask) use magicInpaint; to extend the image
past its edges use imageOutpainting. Async — returns a task_id (auto-polled).
Authentication
AuthorizationApi-Key
Header authentication of the form Api-Key <token>
OR
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
image_url
URL of the source image.
prompt
Text description of what to generate in the masked area.
mask_url
URL of the mask image (white = fill area).
mask_base64
Base64-encoded mask image (alternative to mask_url).
negative_prompt
What to avoid in the generated content.
count
Number of variations to generate.
Response
Async task queued.
task_id
Poll GET /api/v1/tasks/{task_id} until SUCCESS or FAILURE.
