# Flux Lora | Portrait Trainer Optimized FLUX LoRA training for portrait generation with vivid highlights and highly detailed results. ## API Information - **Model Slug:** flux-lora-portrait-trainer - **Branded URL:** https://www.eachlabs.ai/black-forest-labs/flux-lora/flux-lora-portrait-trainer - **Provider:** Black Forest Labs - **Category:** Training - **Output Type:** code - **Status:** active - **Version:** 0.0.1 - **Base Cost:** Within 1000-step minimum: flat $2.40 - **Estimated Processing Time:** 225 seconds - **Last Updated:** 2026-06-10 - **Interactive Demo:** https://www.eachlabs.ai/ai-models/flux-lora-portrait-trainer ## Pricing - **Charge Type:** dynamic - **Estimated Price (default example):** $2.40 - **Pricing Details:** Within 1000-step minimum: flat $2.40 ### Pricing Rules | Condition | Pricing | | --- | --- | | steps <= "1000" | Within 1000-step minimum: flat $2.40 | | steps > "1000" | Over 1000 steps: $0.0024 per step on the whole step count | | Default (fallback) | $2.40 | ## Input Schema | Parameter | Type | Required | Default | Constraints | Description | |-----------|------|----------|---------|-------------|-------------| | images_data_url | string | Yes | - | zip | Only a ZIP archive URL is accepted. The ZIP must contain at least 10 images of a consistent style (more is recommended). Optionally, you can include text files (captions) with the same name as each image. If the captions contain the string [trigger] and a trigger_word parameter is provided, [trigger] will automatically be replaced with that word. | | trigger_phrase | string | No | - | - | Trigger phrase to be used in the captions. If None, a trigger word will not be used. If no captions are provide the trigger_work will be used instead of captions. If captions are provided, the trigger word will replace the `[trigger]` string in the captions. | | steps | integer | No | 1000 | 1–10000 | Number of steps to train the LoRA on. | | multiresolution_training | boolean | No | true | - | If True, multiresolution training will be used. | | subject_crop | boolean | No | true | - | If True, the subject will be cropped from the image. | | data_archive_format | string | No | - | - | The format of the archive. If not specified, the format will be inferred from the URL. | | resume_from_checkpoint | string | No | - | - | URL to a checkpoint to resume training from. | | create_masks | boolean | No | false | - | If True, masks will be created for the subject. | | learning_rate | number | No | 0.00009 | 0.000001–0.001 | Learning rate to use for training. | ## Example Request ```bash curl -X POST https://api.eachlabs.ai/v1/prediction/ \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "flux-lora-portrait-trainer", "input": { "images_data_url": "https://your-asset-url" } }' ``` ## Output Schema Response returned by `GET /v1/prediction/{id}` when the job completes: ```json { "status": "success", "predictionID": "string", "output": "code", "metrics": { "predict_time": "number (seconds)" } } ``` ## Polling ```bash curl https://api.eachlabs.ai/v1/prediction/{PREDICTION_ID} \ -H "Authorization: Bearer YOUR_API_KEY" ``` | Status | Meaning | |--------|---------| | `processing` | Still running — poll again | | `success` | Done — read `output` | | `error` | Failed — read `message` / `details` | ## Webhook (alternative to polling) Pass `"webhook_url": "https://your.host/path"` in the create request. Eachlabs POSTs this payload when the job ends: ```json { "exec_id": "prediction-uuid", "status": "succeeded", "output": "https://...", "error": "" } ``` `status` is `"succeeded"` or `"failed"`. `exec_id` equals the `predictionID` from create. Return 2xx within 30 seconds. ## Errors Error body: `{ "status": "error", "message": "...", "details": "..." }` | Code | Meaning | |------|---------| | `400` | Invalid input | | `401` | Missing / invalid `Authorization` bearer token | | `404` | Unknown model or prediction id | | `429` | Rate limit — 100 creates / min, 10 concurrent per key | | `5xx` | Retry with backoff | ## Overview **flux-lora-portrait-trainer — Training AI Model** flux-lora-portrait-trainer from Black Forest Labs empowers developers and creators to fine-tune FLUX models specifically for generating stunning portraits with vivid highlights and intricate details. Part of the flux-lora family, this training tool optimizes LoRA adapters on the high-performance FLUX.2 architecture, enabling custom portrait generation that excels in photorealistic facial rendering and expressive lighting. Ideal for those searching for **flux-lora-portrait-trainer API** or **Black Forest Labs training** solutions, it delivers highly detailed results up to 4MP resolution with any aspect ratio. Unlike generic training scripts, flux-lora-portrait-trainer leverages FLUX.2's rectified flow transformer design, distilled for efficiency while preserving quality for portrait-specific adaptations. This makes it perfect for building specialized AI models that capture nuanced skin tones, dynamic poses, and professional lighting in portraits. ## Usage Notes - API Base URL: `https://api.eachlabs.ai/v1` - Authentication: send `Authorization: Bearer YOUR_API_KEY`. Generate a key from the Eachlabs dashboard at https://www.eachlabs.ai/dashboard/api-keys. - File-typed parameters (`*_url`, `image_url`, `video_url`, `audio_url`, etc.) accept publicly-reachable HTTPS URLs only. Upload your asset first (GCS / S3 / your CDN) and pass the resulting URL. Data-URIs and localhost URLs are rejected. - For structured parameters (arrays / objects) send real JSON values, not stringified payloads. - Monetary values are reported in USD; per-token / per-megapixel rates may be billed in micro-cents internally. - Prefer `webhook_url` over polling for long-running predictions — see the Webhook Callback section.