Skip to content

Create Task black-forest-labs/flux-fill-pro

POST https://www.kkiai.com/replicate/v1/models/black-forest-labs/flux-fill-pro/predictions

Official documentation: https://replicate.com/black-forest-labs/flux-fill-pro

Request Parameters

Authorization

Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.

Example: Authorization: Bearer ********************

Header Parameters

ParameterTypeRequiredDescriptionExample
AuthorizationstringOptionalBearer {{YOUR_API_KEY}}

Body Parameters (application/json)

ParameterTypeRequiredDescription
inputobjectOptional
  └ maskstringOptionalA black and white image describing the parts of the image that need to be repaired. Black areas will be preserved, white areas will be repaired. Must be the same size as the image. This parameter is optional if you provide an Alpha mask in the original image. Must be in jpeg, png, gif, or webp format.
  └ imagestringRequiredThe image to be repaired. Can contain an Alpha mask. Must be in jpeg, png, gif, or webp format.
  └ stepsintegerOptionalNumber of diffusion steps. Higher values result in finer details but longer processing time. Default: 50. Minimum: 15, Maximum: 50.
  └ promptstringRequiredText prompt for image generation.
  └ guidanceintegerOptionalControls the balance between adherence to the text prompt and image quality/diversity. Higher values make the output closer to the prompt but may reduce overall image quality. Lower values provide more creative freedom but may have lower relevance to the prompt. Default: 60. Minimum: 1.5, Maximum: 100.
  └ outpaintstringOptionalOption for quick repair of the input image. The mask will be ignored. Default: "None"
  └ output_formatstringOptionalFormat of the output image. Default: "jpg".
  └ safety_toleranceintegerOptionalSafety tolerance, 1 is most strict, 6 is most lenient. Default: 2.
  └ prompt_upsamplingbooleanOptionalAutomatically modify the prompt to generate more creative results. Default: false

Request Example

json
{
    "input": {
      "mask": "https://replicate.delivery/pbxt/M0gpLCYdCLbnhcz95Poy66q30XW9VSCN65DoDQ8IzdzlQonw/kill-bill-mask.png",
      "image": "https://replicate.delivery/pbxt/M0gpKVE9wmEtOQFNDOpwz1uGs0u6nK2NcE85IihwlN0ZEnMF/kill-bill-poster.jpg",
      "steps": 50,
      "prompt": "movie poster says \"FLUX FILL\"",
      "guidance": 60,
      "outpaint": "None",
      "output_format": "jpg",
      "safety_tolerance": 2,
      "prompt_upsampling": false
    }
  }

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/replicate/v1/models/black-forest-labs/flux-fill-pro/predictions' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
      "mask": "https://replicate.delivery/pbxt/M0gpLCYdCLbnhcz95Poy66q30XW9VSCN65DoDQ8IzdzlQonw/kill-bill-mask.png",
      "image": "https://replicate.delivery/pbxt/M0gpKVE9wmEtOQFNDOpwz1uGs0u6nK2NcE85IihwlN0ZEnMF/kill-bill-poster.jpg",
      "steps": 50,
      "prompt": "movie poster says \"FLUX FILL\"",
      "guidance": 60,
      "outpaint": "None",
      "output_format": "jpg",
      "safety_tolerance": 2,
      "prompt_upsampling": false
    }
  }'

Response

🟢 200 Success

Response Body

ParameterTypeRequiredDescription
idstringRequired
modelstringRequired
versionstringRequired
inputobjectRequired
  └ aspect_ratiostringRequired
  └ input_imagestringRequired
  └ output_formatstringRequired
  └ promptstringRequired
  └ prompt_upsamplingbooleanRequired
  └ safety_toleranceintegerRequired
logsstringRequired
outputnullRequired
data_removedbooleanRequired
errornullRequired
statusstringRequired
created_atstringRequired
urlsobjectRequired
  └ cancelstringRequired
  └ getstringRequired
  └ streamstringRequired
  └ webstringRequired

Response Example

json
{
    "id": "w72vtvbb79rmc0crb57tckqt24",
    "model": "black-forest-labs/flux-fill-pro",
    "version": "hidden",
    "input": {
        "guidance": 60,
        "image": "https://replicate.delivery/pbxt/M0gpKVE9wmEtOQFNDOpwz1uGs0u6nK2NcE85IihwlN0ZEnMF/kill-bill-poster.jpg",
        "mask": "https://replicate.delivery/pbxt/M0gpLCYdCLbnhcz95Poy66q30XW9VSCN65DoDQ8IzdzlQonw/kill-bill-mask.png",
        "outpaint": "None",
        "output_format": "jpg",
        "prompt": "movie poster says \"FLUX FILL\"",
        "prompt_upsampling": false,
        "safety_tolerance": 2,
        "steps": 50
    },
    "logs": "",
    "output": null,
    "data_removed": false,
    "error": null,
    "status": "starting",
    "created_at": "2025-07-30T03:10:33.786Z",
    "urls": {
        "cancel": "https://api.replicate.com/v1/predictions/w72vtvbb79rmc0crb57tckqt24/cancel",
        "get": "https://api.replicate.com/v1/predictions/w72vtvbb79rmc0crb57tckqt24",
        "stream": "https://stream.replicate.com/v1/files/bcwr-3y7tn6jo35hzo7xvk5kf2dslvdwmggf5zty5vnbfhq4tsggfhesa",
        "web": "https://replicate.com/p/w72vtvbb79rmc0crb57tckqt24"
    }
}