Docs Replicate official format /replicate/v1/models/black-forest-labs/flux-fill-dev/predictions
API reference

Create task black-forest-labs/flux-fill-dev

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

POST/replicate/v1/models/black-forest-labs/flux-fill-dev/predictions

Body Parametersapplication/json

input object

Input content

properties
guidance integer

Image generation guidance information. Default value: 30. Minimum value: 0, maximum value: 100.

image* string

Image to be repaired. Can include alpha masks. If the image width or height is not a multiple of 32, it is scaled to the nearest multiple of 32. If image size exceeds 1440x1440, it will be reduced to fit 1440x1440

lora_scale integer

Determine the applicable strength of the main LoRA. For basic reasoning, a reasonable result is between 0 and 1. For go_fast, we apply a 1.5x multiplier to this value; typically performance is good when scaling the base value by this multiple. You may still need to experiment to find the best value for your specific LoRA. Default value: 1. Minimum value: -1, maximum value: 3.

mask string

A black and white image describing the part of the image that needs to be restored. Black areas will be preserved and white areas will be repaired.

megapixels string

The approximate number of pixels of the generated image. Use match_input to match the size of the input (up to 1440x1440 pixels), default: "1".

num_inference_steps integer

Number of denoising steps. The recommended range is 28-50, with fewer steps the lower the output quality but the faster the speed. Default value: 28. Minimum value: 1, maximum value: 50.

num_outputs integer

The amount of output to generate. Default value: 1. Minimum value: 1, maximum value: 4.

output_format string

The format of the output image. Default: "webp".

output_quality integer

The quality at which the output image is saved, from 0 to 100. 100 is the best quality, 0 is the lowest quality. Has nothing to do with .png output. Default: 80

prompt* string

Prompt to generate image.

Responses

200 application/json
response-200 object
properties
created_at string

Creation time

data_removed boolean

Whether sensitive data has been removed

error string nullable

Error message

id* string

Resource or task ID

input object

Input content

logs string

Run logs

model string

Model name / model ID

output string nullable

Output result

status* string

Status

urls object

List of resource URLs

version string

Version

400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example
1{
2"input": {
3"guidance": 30,
4"image": "https://replicate.delivery/pbxt/M0hxMJeO7wFCMr7QYNZsjRxzHhz6ntlLllMteRQNsRD7f3Nf/flux-fill-dev.webp",
5"lora_scale": 1,
6"mask": "https://replicate.delivery/pbxt/M0hxLu8a1YBcybWuumSsfoEec8ooer6JZ2fR28vuM1U0CN9m/74b40bb1-364a-461a-bec5-200a38c7bc87.png",
7"megapixels": "1",
8"num_inference_steps": 28,
9"num_outputs": 2,
10"output_format": "webp",
11"output_quality": 80,
12"prompt": "a spaceship"
13}
14}
Code Sample cURL
1curl -X POST "https://api.digislash.com/replicate/v1/models/black-forest-labs/flux-fill-dev/predictions" \
2-H "Authorization: Bearer <API Key>" \
3-H "Content-Type: application/json" \
4-d '{
5"input": {
6"guidance": 30,
7"image": "https://replicate.delivery/pbxt/M0hxMJeO7wFCMr7QYNZsjRxzHhz6ntlLllMteRQNsRD7f3Nf/flux-fill-dev.webp",
8"lora_scale": 1,
9"mask": "https://replicate.delivery/pbxt/M0hxLu8a1YBcybWuumSsfoEec8ooer6JZ2fR28vuM1U0CN9m/74b40bb1-364a-461a-bec5-200a38c7bc87.png",
10"megapixels": "1",
11"num_inference_steps": 28,
12"num_outputs": 2,
13"output_format": "webp",
14"output_quality": 80,
15"prompt": "a spaceship"
16}
17}'
Response
1▼{
2"created_at": "2025-07-30T03:03:25.864Z",
3"data_removed": false,
4"id": "tv3jnp73n1rmc0crb54b3srz94",
5▼"input": {
6"guidance": 30,
7"image": "https://replicate.delivery/pbxt/M0hxMJeO7wFCMr7QYNZsjRxzHhz6ntlLllMteRQNsRD7f3Nf/flux-fill-dev.webp",
8"lora_scale": 1,
9"mask": "https://replicate.delivery/pbxt/M0hxLu8a1YBcybWuumSsfoEec8ooer6JZ2fR28vuM1U0CN9m/74b40bb1-364a-461a-bec5-200a38c7bc87.png",
10"megapixels": "1",
11"num_inference_steps": 28,
12"num_outputs": 1,
13"output_format": "webp",
14"output_quality": 80,
15"prompt": "a spaceship"
16},
17"logs": "",
18"model": "black-forest-labs/flux-fill-dev",
19"status": "starting",
20▼"urls": {
21"cancel": "https://api.replicate.com/v1/predictions/tv3jnp73n1rmc0crb54b3srz94/cancel",
22"get": "https://api.replicate.com/v1/predictions/tv3jnp73n1rmc0crb54b3srz94",
23"stream": "https://stream.replicate.com/v1/files/bcwr-epcf2nmmvkvxq7trerel6zuoiwzyoji3ifhkuu3lf7rtdzh3i6ca",
24"web": "https://replicate.com/p/tv3jnp73n1rmc0crb54b3srz94"
25},
26"version": "hidden"
27}