Flux 2 | Text to Image Lora
Generate images from text prompts with up to 3 LoRA weights for specialized style control. Supports URL, HuggingFace, and other LoRA sources.
Quick Start
Requires an each::labs API key. Get one at eachlabs.ai.
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "flux-2-lora",
"version": "0.0.1",
"input": {
"prompt": "a mystical forest with glowing mushrooms, fantasy art",
"loras": [{"path": "https://example.com/fantasy-lora.safetensors", "scale": 0.8}],
"image_size": "square_hd",
"guidance_scale": 2.5
}
}'
Parameters
| Parameter |
Type |
Default |
Description |
| acceleration |
string |
none |
The acceleration level to use. enum: none, regular, high |
| enable_prompt_expansion |
boolean |
false |
If set to true, the prompt will be expanded for better results. |
| enable_safety_checker |
boolean |
true |
If set to true, the safety checker will be enabled. |
| guidance_scale |
number |
2.5 |
Guidance Scale controls how closely the model follows your prompt. |
| image_size |
string |
square_hd |
The size of the generated image. enum: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 |
| loras |
array |
|
List of LoRA weights to apply (maximum 3). URL, HuggingFace repo, or other sources. |
| num_images |
integer |
1 |
The number of images to generate. |
| num_inference_steps |
integer |
28 |
The number of inference steps to perform. |
| output_format |
string |
png |
The format of the generated image. enum: jpeg, png, webp |
| prompt |
string |
|
The prompt to generate an image from. |
| seed |
integer |
|
The seed to use for the generation. |
Examples
Single LoRA generation:
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "flux-2-lora",
"version": "0.0.1",
"input": {
"prompt": "professional headshot, studio lighting, clean background",
"loras": [{"path": "https://example.com/portrait-lora.safetensors", "scale": 0.9}],
"image_size": "portrait_4_3",
"output_format": "jpeg",
"num_inference_steps": 30
}
}'
Multi-LoRA with acceleration:
curl -X POST https://api.eachlabs.ai/v1/prediction \
-H "Content-Type: application/json" \
-H "X-API-Key: $EACHLABS_API_KEY" \
-d '{
"model": "flux-2-lora",
"version": "0.0.1",
"input": {
"prompt": "vintage car on a coastal highway, golden hour",
"loras": [
{"path": "https://example.com/vintage-lora.safetensors", "scale": 0.7},
{"path": "https://example.com/automotive-lora.safetensors", "scale": 0.6}
],
"acceleration": "high",
"image_size": "landscape_16_9",
"num_images": 3,
"seed": 42
}
}'
Related Models
Documentation
1---2name: flux-2-lora3description: Flux 2 | Text to Image Lora. Generate images using LoRA weights for specialized styles. Triggers: text to image, flux, lora, fine-tuned, style generation4---56# Flux 2 | Text to Image Lora78Generate images from text prompts with up to 3 LoRA weights for specialized style control. Supports URL, HuggingFace, and other LoRA sources.910## Quick Start1112> Requires an each::labs API key. Get one at [eachlabs.ai](https://eachlabs.ai).1314```bash15curl -X POST https://api.eachlabs.ai/v1/prediction \16 -H "Content-Type: application/json" \17 -H "X-API-Key: $EACHLABS_API_KEY" \18 -d '{19 "model": "flux-2-lora",20 "version": "0.0.1",21 "input": {22 "prompt": "a mystical forest with glowing mushrooms, fantasy art",23 "loras": [{"path": "https://example.com/fantasy-lora.safetensors", "scale": 0.8}],24 "image_size": "square_hd",25 "guidance_scale": 2.526 }27 }'28```2930## Parameters3132| Parameter | Type | Default | Description |33|-----------|------|---------|-------------|34| acceleration | string | none | The acceleration level to use. enum: none, regular, high |35| enable_prompt_expansion | boolean | false | If set to true, the prompt will be expanded for better results. |36| enable_safety_checker | boolean | true | If set to true, the safety checker will be enabled. |37| guidance_scale | number | 2.5 | Guidance Scale controls how closely the model follows your prompt. |38| image_size | string | square_hd | The size of the generated image. enum: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9 |39| loras | array | | List of LoRA weights to apply (maximum 3). URL, HuggingFace repo, or other sources. |40| num_images | integer | 1 | The number of images to generate. |41| num_inference_steps | integer | 28 | The number of inference steps to perform. |42| output_format | string | png | The format of the generated image. enum: jpeg, png, webp |43| prompt | string | | The prompt to generate an image from. |44| seed | integer | | The seed to use for the generation. |4546## Examples4748**Single LoRA generation:**49```bash50curl -X POST https://api.eachlabs.ai/v1/prediction \51 -H "Content-Type: application/json" \52 -H "X-API-Key: $EACHLABS_API_KEY" \53 -d '{54 "model": "flux-2-lora",55 "version": "0.0.1",56 "input": {57 "prompt": "professional headshot, studio lighting, clean background",58 "loras": [{"path": "https://example.com/portrait-lora.safetensors", "scale": 0.9}],59 "image_size": "portrait_4_3",60 "output_format": "jpeg",61 "num_inference_steps": 3062 }63 }'64```6566**Multi-LoRA with acceleration:**67```bash68curl -X POST https://api.eachlabs.ai/v1/prediction \69 -H "Content-Type: application/json" \70 -H "X-API-Key: $EACHLABS_API_KEY" \71 -d '{72 "model": "flux-2-lora",73 "version": "0.0.1",74 "input": {75 "prompt": "vintage car on a coastal highway, golden hour",76 "loras": [77 {"path": "https://example.com/vintage-lora.safetensors", "scale": 0.7},78 {"path": "https://example.com/automotive-lora.safetensors", "scale": 0.6}79 ],80 "acceleration": "high",81 "image_size": "landscape_16_9",82 "num_images": 3,83 "seed": 4284 }85 }'86```8788## Related Models8990- [Flux 2 | Lora Edit](../flux-2-lora-edit/) - LoRA-based image editing91- [Flux 2](../flux-2/) - Standard text-to-image generation92- [BFL Flux Lora](../bfl-flux-lora/) - Alternative Flux LoRA model9394## Documentation9596- [each::labs Docs](https://docs.eachlabs.ai)97- [API Reference](https://docs.eachlabs.ai/api/overview)