TheFluxTrain

LoRA generation

Generate images with your trained LoRA models.

Generate images that follow your LoRA (custom-trained style or subject). Pass the LoRA identifiers you use in TheFluxTrain together with a prompt.

URL: POST https://api.thefluxtrain.com/api/v1/image-generate/lora

Authentication: x-api-key

Request body

FieldTypeRequiredDefaultDescription
promptstringYesText prompt
lorasstringYesLoRA identifiers (e.g. Hugging Face repo names or URLs)
trainer_modelstringYesflux1, flux2, or qwen_image
lora_scalesnumberNo[1.0]Scale per LoRA (0.0–2.0)
aspect_ratiostringNo1:1Output aspect ratio
prompt_strengthnumberNo0.8Prompt strength
num_outputsintegerNo1Number of images
num_inference_stepsintegerNo28Inference steps
guidance_scalenumberNo3.5Guidance scale
output_formatstringNopngOutput format
output_qualityintegerNo80Output quality
imagestringNoInput image URL or data URI (image-to-image)
maskstringNoMask URL or data URI
seedintegerNoSeed for reproducibility
use_oyecartoonbooleanNofalseCartoon-style path when supported
should_paste_referencebooleanNofalsePaste reference image
strengthnumberNo0.9Image-to-image strength
folder_idstringNoFolder UUID in your account
project_idstringNoOptional project ID
training_idstringNoOptional training ID
message_idstringNoYour own tracking ID

Example

{
  "prompt": "ohwx person in a cafe, natural light",
  "loras": ["your-org/your-lora"],
  "trainer_model": "flux2",
  "lora_scales": [1.0],
  "aspect_ratio": "3:4",
  "folder_id": "your-folder-uuid"
}

Response

Same response format as Image generation. Key data fields:

FieldTypeDescription
idstringJob ID
urlstringOutput URL when complete
statusstringSUCCESS, PENDING, etc.
media_typestringIMAGE
metaobjectProvider metadata
folder_idstring | nullFolder UUID
created_atstring | nullISO 8601 timestamp

Poll Jobs when status is PENDING.