LoRA Training
Train Image LoRA
Train a LoRA adapter on an image dataset. Returns a task id for status polling.
POST
Train a lightweight LoRA adapter on a curated image dataset to
capture a style, subject, or aesthetic. The trained adapter is
addressable by the
name you supply and can be passed to any
LoRA-aware image generation tool.
Authorization
Bearer token.
Bearer API_key.Request Body
Reference to the training dataset. Accepts either:
- A URL to a zip archive of training images
- A file id returned from file upload
Stable snake-case identifier for the trained adapter. Used as the
lora_name field when passing the adapter to image generation
calls. Lowercase letters, digits, and underscores only.Status polling
Poll Training Status with the returnedtask_id until status is completed. The completed
adapter is then addressable by its name everywhere LoRAs are
supported.
Tips
- Dataset size: 10–30 images for style adapters; up to 100 for subject adapters with diverse viewpoints.
- Resolution: 1024×1024 is the sweet spot. Mixed aspect ratios are fine — they’re center-cropped server-side.
- Caption format: include caption text files alongside images inside the zip when you want explicit guidance; otherwise the trainer auto-captions via a VL pre-step.