This endpoint will start the training of a LoRA model for Flux Pro and returns its associated unique trigger word.
SecurityAPIKeyHeader
Request
Request Body schema: multipart/form-data
image_files
Array of strings <binary> (Image Files)
Images to be uploaded for training. For FluxFintune and FluxProFintune, providing a few images of the desired object/person/style will usually suffice. In case of FluxKontextFinetune, images should be provided in pairs. For each pair, the first image will be used as 'start' and the second image as 'end' for the training. Where the 'end' image contains the desired outcome of applying the edit described in 'prompt' to the 'start' image.
image_urls
Array of strings (Image URLs)
Default: []
Alternatively you can provide URLs of the training image files. If you upload image files, this field will be ignored.
num_iterations
integer (Number of training iterations. Defaults to 0 for Auto. In Auto mode the actual values for )
Default: 0
option
string (Option)
Default: "FluxFinetune"
Training option to finetune based on your images. Available values are FluxFinetune, FluxProFinetune, FluxKontextFinetune.
finetune_type
string (Finetune Type)
Default: "Auto"
Override finetune type. Finetune type can be Auto, Character, Product, or Style. Choose Auto for automatic selection (default). This field is ignored when option is set to FluxKontextFinetune
lora_prefix
string (Lora Prefix)
Default: "MYLORA"
Prefix for the name of LoRA. Try to choose a unique string.
prompt
string (Prompt)
Prompt describing the relationship between the start and end images in given image pairs when FluxKontextFinetune is used. It is ignored with other options. For instance, if in the 'start' image is a blue car but the 'end' image is a red car the prompt can be 'turn the car red.'
webhook_url
string (Webhook Url)
Responses
200
Trigger word.
400
Bad Request
402
Insufficient Credit
422
Validation Error
post/finetune
Request samples
curl
JavaScript
Python
Go
Node.js
Response samples
200
400
402
422
application/json
{
"data": {
"id": "ASSET_ID",
"customer_id": "CUSTOMER_ID",
"primary_user_id": "CUSTOMER_ID",
"args": { },
"results": [
"result_url1",
"result_url2"
],
"thumbnails": [ ],
"status": "success",
"mime_type": "MIMETYPE",
"app_name": "FUNCTION_NAME",
"created_at": "2025-05-06 16:35:59.840508+00:00",
"updated_at": "2025-05-06 16:35:59.840508+00:00",
"history": [ ]
}
}
Finetune Flux Pro/Dev
This endpoint will report the status of training LoRA models for Flux Pro. If completed, it will also return sample outputs for the LoRA.