---
title: "Inpaint an image with FLUX.1 Fill [pro] using an input image and mask"
method: POST
path: "/v1/flux-pro-1.0-fill"
tags: ["Models"]
---

# Inpaint an image with FLUX.1 Fill [pro] using an input image and mask

`POST /v1/flux-pro-1.0-fill`

Submits an image generation task with the FLUX.1 Fill [pro] model using an input image and mask. Mask can be applied to alpha channel or submitted as a separate image.

## Request body

- FluxProFillInputs
  - `image` string, required — A Base64-encoded string representing the image you wish to modify. Can contain alpha mask if desired.
  - `mask` string, nullable — A Base64-encoded string representing a mask for the areas you want to modify in the image. The mask should be the same dimensions as the image and in black and white. Black areas (0%) indicate no modification, while white areas (100%) specify areas for inpainting. Optional if you provide an alpha mask in the original image. Validation: The endpoint verifies that the dimensions of the mask match the original image.
  - `prompt` string, nullable — The description of the changes you want to make. This text guides the inpainting process, allowing you to specify features, styles, or modifications for the masked area.
  - `steps` integer, nullable — Number of steps for the image generation process
  - `prompt_upsampling` boolean, nullable — Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation
  - `seed` integer, nullable — Optional seed for reproducibility
  - `guidance` number, nullable — Guidance strength for the image generation process
  - `output_format` 'jpeg' | 'png' | 'webp'
  - `safety_tolerance` integer — Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.
  - `webhook_url` string, uri, nullable — URL to receive webhook notifications
  - `webhook_secret` string, nullable — Optional secret for webhook signature verification

## Response `200`

Successful Response

- union
  - AsyncResponse
    - `id` string, required
    - `polling_url` string, required
    - `cost` number, nullable — Cost in credits for this request
    - `input_mp` number, nullable — Input megapixels (2 decimal places)
    - `output_mp` number, nullable — Output megapixels (2 decimal places)
  - AsyncWebhookResponse
    - `id` string, required
    - `status` string, required
    - `webhook_url` string, required
    - `cost` number, nullable — Cost in credits for this request
    - `input_mp` number, nullable — Input megapixels (2 decimal places)
    - `output_mp` number, nullable — Output megapixels (2 decimal places)

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/bfl/apis/bfl-api.md) · [All operations](https://skmtc.net/bfl/apis/bfl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bfl/bfl-api/versions/a0209bab18e1/schema)
