v2

OpenAPI 3.1.02026-07-26262762.2 KB
Models

Generate an image with FLUX.1 Fill [pro] finetune using an input image and mask.

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

post/v1/flux-pro-1.0-fill-finetuned

Request body

finetune_idstring required

Name of the LoRA to use. For LoRAs from other organizations (public or shared), use the format 'org-id/lora-name'.

finetune_strengthnumber

Strength of the fine-tuned model. 0.0 means no influence, 1.0 means full influence. Allowed values up to 2.0

imagestring required

A Base64-encoded string representing the image you wish to modify. Can contain alpha mask if desired.

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

promptstring

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.

stepsinteger

Number of steps for the image generation process

prompt_upsamplingboolean

Whether to perform upsampling on the prompt. If active, automatically modifies the prompt for more creative generation

seedinteger nullable

Optional seed for reproducibility

guidancenumber

Guidance strength for the image generation process

output_format'jpeg' | 'png' | 'webp'
safety_toleranceinteger

Tolerance level for input and output moderation. Between 0 and 6, 0 being most strict, 6 being least strict.

webhook_urlstring uri nullable

URL to receive webhook notifications

webhook_secretstring nullable

Optional secret for webhook signature verification

Example request

{
  "finetune_id": "my-finetune",
  "prompt": "ein fantastisches bild",
  "steps": 50,
  "safety_tolerance": 2
}

Response

Successful Response

OR