Lora Training Start
const url = 'https://example.com/api/lora-training/start';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"job_name":"mycharacter_flux2_v1","trigger_word":"mycharacter","base_config":"flux2_identity","dataset":"mycharacter_dataset_v1","model":"flux2_dev","model_name_or_path":"black-forest-labs/FLUX.2-dev","low_vram":false,"layer_offloading":false,"transformer_quantization":"qfloat8","te_quantization":"qfloat8","lora_rank":32,"steps":1800,"learning_rate":0.0001,"batch_size":1,"gradient_accumulation":1,"optimizer":"adamw8bit","weight_decay":0.0001,"timestep_type":"weighted","loss_type":"mse","cache_text_embeddings":true,"unload_text_encoder":false,"resolution":[768,896,1024],"caption_dropout_rate":0,"cache_latents":true,"dop_enabled":false,"preservation_class":"photo","differential_guidance":false,"differential_guidance_scale":3,"sample_every":250,"sample_steps":25,"sample_width":1024,"sample_height":1024,"sample_guidance_scale":1,"sample_seed":42,"sample_prompts":["example"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/lora-training/start \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "job_name": "mycharacter_flux2_v1", "trigger_word": "mycharacter", "base_config": "flux2_identity", "dataset": "mycharacter_dataset_v1", "model": "flux2_dev", "model_name_or_path": "black-forest-labs/FLUX.2-dev", "low_vram": false, "layer_offloading": false, "transformer_quantization": "qfloat8", "te_quantization": "qfloat8", "lora_rank": 32, "steps": 1800, "learning_rate": 0.0001, "batch_size": 1, "gradient_accumulation": 1, "optimizer": "adamw8bit", "weight_decay": 0.0001, "timestep_type": "weighted", "loss_type": "mse", "cache_text_embeddings": true, "unload_text_encoder": false, "resolution": [ 768, 896, 1024 ], "caption_dropout_rate": 0, "cache_latents": true, "dop_enabled": false, "preservation_class": "photo", "differential_guidance": false, "differential_guidance_scale": 3, "sample_every": 250, "sample_steps": 25, "sample_width": 1024, "sample_height": 1024, "sample_guidance_scale": 1, "sample_seed": 42, "sample_prompts": [ "example" ] }'Build the training config locally, then enqueue and start via ai-toolkit UI API.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Training template name; resolves to
Dataset folder name on the droplet under /root/flixml-training/datasets/
Base model label, stored with the job
Hugging Face repo id for the base checkpoint
Enable Low VRAM mode (Tier A 16-24 GB)
Stream layers from CPU RAM (Tier A only)
Unload TE after caching embeddings (VRAM saver)
Resolution buckets for training
Dropout rate for captions; set 0 when cache_text_embeddings is on
Cache VAE latents to disk to save VRAM
Differential Output Preservation - keep base model behaviour outside your trigger
Neutral class word for DOP non-trigger path
Exaggerate the gap toward target for faster detail lock-in
Responses
Section titled “Responses”Successful Response
object
Examplegenerated
{ "ok": true, "job_name": "example", "status": "example", "config_path": "example", "output_dir": "example", "error": "example"}Validation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}