Finetune

APIs for training new model.

Create Finetune

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.

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
string (String number of training iterations. Defaults to 1200.)
Default: "1200"
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 CHARACTER, PRODUCT or Auto for automatic selection.

lora_prefix
string (Lora Prefix)
Default: "MYLORA"

Prefix for the name of LoRA.

Prompts (string) or Prompts (null) (Prompts)

List of prompts to be used with input images.

Responses
200

Trigger word.

400

Bad Request

402

Insufficient Credit

422

Validation Error

post/finetune
Request samples
Response samples
application/json
{
  • "data": {
    }
}

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.

SecurityAPIKeyHeader
Responses
200

Modified image url.

400

Bad Request

402

Insufficient Credit

422

Validation Error

get/finetune/{trigger_word}
Request samples
Response samples
application/json