AI Photos (LoRAs)
Train a personal LoRA from a small set of subject photos, then generate AI photos of that subject from any text prompt.
The /v2/loras family lets you train and manage personal LoRAs — small fine-tunes that bake a specific subject (a person, a style, an object) into a reusable adapter you can run inference against in seconds.
Once a LoRA is READY, generate AI photos of that subject by hitting POST /v2/images/generate with model: "flux-lora" and the loraId you got back from training.
How it works
flowchart LR
A["POST /v2/loras\n(15-30 photos + name)"] --> B[Caption + zip + upload]
B --> C[Adapter training]
C --> D[Status READY]
D --> E["POST /v2/images/generate\nmodel: flux-lora\nloraId: ..."]- Upload 15–30 subject photos (jpg / png / webp, ≤10 MB each, ≤100 MB total) to
POST /v2/lorasalong with anameand (forpersonLoRAs)gender+ethnicity. - The API auto-captions every image with a vision model, packages the dataset, and starts the training run. This takes ~15–25 minutes depending on the step count.
- The LoRA's
statustransitions throughPENDING → UPLOADING → TRAINING → READY(orFAILED). PollGET /v2/loras/:idor set awebhookUrlto be notified. - Once
READY, generate from the trained LoRA viaPOST /v2/images/generate— seeflux-lora.
Trigger words
Every LoRA gets a unique 5-character trigger word generated server-side. The trigger word is returned on the LoRA object once status === READY so you can pre-fill it into your prompts and edit freely. The server de-duplicates: if your prompt already contains the trigger word it forwards as-is, otherwise it auto-prepends it. Either way, the trained subject shows up.
Concurrency limit
Each team can have at most team.maxConcurrentTrainings (default 10) LoRAs in PENDING | UPLOADING | TRAINING at the same time. Submissions over the cap return 429 Too Many Requests.
Pricing
| Step | Cost | Notes |
|---|---|---|
| Upload + caption + zip | 2 credits | Charged at POST /v2/loras time. Refunded on failure. |
| Training | 255 credits | Charged just before training starts. Refunded if training fails. |
| Inference (per image) | 2 credits | Charged per output image, 1–4 per request. See flux-lora. |
Endpoints
POST /v2/loras— start a new training.GET /v2/loras— paginated list of your team's LoRAs.GET /v2/loras/:id— single LoRA detail (poll for status).DELETE /v2/loras/:id— soft-archive (in-flightflux-lorajobs that already started keep working).
Webhooks
Pass webhookUrl to POST /v2/loras to be notified when training reaches a terminal state. The payload is signed with your API key hash; see Webhooks for the verification recipe.
{
"event": "completed",
"id": "lora_8a4d…",
"status": "READY",
"imageCount": 18,
"completedAt": "2026-04-25T10:42:11.000Z"
}