---
title: "Media · Image · Generative fill / inpaint with prompt"
method: POST
path: "/api/v1/tools/generative-fill"
tags: ["edit"]
---

# Media · Image · Generative fill / inpaint with prompt

`POST /api/v1/tools/generative-fill`

## Request

- Base URL: `https://api.simplified.com`
- URL: `https://api.simplified.com/api/v1/tools/generative-fill`
- Auth: API key in header `Authorization`

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).

## Request body

- object
  - `image_url` string, required: URL of the source image.
  - `prompt` string, required: Text description of what to generate in the masked area.
  - `mask_url` string: URL of the mask image (white = fill area).
  - `mask_base64` string: Base64-encoded mask image (alternative to mask_url).
  - `negative_prompt` string: What to avoid in the generated content.
  - `count` integer: Number of variations to generate.

## Response `202`

Async task queued.

- AsyncTaskResponse
  - `task_id` string: Poll GET /api/v1/tasks/{task_id} until SUCCESS or FAILURE.

---

[API](https://skmtc.dev/simplified/apis/image-tools.md) - [All operations](https://skmtc.dev/simplified/apis/image-tools/llms.txt) - [OpenAPI document](https://skmtc.dev/simplified/apis/image-tools/revisions/7de7bf8f6707?raw)
