llms.txt
FLUX.1 [dev] with LoRAs
Super fast endpoint for the FLUX.1 [dev] model with LoRA support, enabling rapid and high-quality image generation using pre-trained LoRA adaptations for personalization, specific styles, brand identities, and product-specific outputs.
Overview
- Endpoint:
https://fal.run/fal-ai/flux-lora - Model ID:
fal-ai/flux-lora - Category: text-to-image
- Kind: inference
- Tags: lora, personalization
Pricing
- Price: $0.035 per megapixels
For more details, see fal.ai pricing.
API Information
This model can be used via our HTTP API or more conveniently via our client libraries. See the input and output schema below, as well as the usage examples.
Input Schema
The API accepts the following input parameters:
prompt(string, required):
The prompt to generate an image from.- Examples: "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word "FLUX" is painted over it in big, white brush strokes with visible texture."
image_size(ImageSize | Enum, optional):
The size of the generated image. Default value:landscape_4_3- Default: "landscape_4_3"
- One of: ImageSize | Enum
num_inference_steps(integer, optional):
The number of inference steps to perform. Default value:28- Default:
28 - Range:
1to50
- Default:
seed(integer, optional):
The same seed and the same prompt given to the same version of the model will output the same image every time.loras(list<LoraWeight>, optional):
The LoRAs to use for the image generation. You can use any number of LoRAs and they will be merged together to generate the final image.- Default:
[] - Array of LoraWeight
- Default:
guidance_scale(float, optional):
The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. Default value:3.5- Default:
3.5 - Range:
0to35
- Default:
sync_mode(boolean, optional):
IfTrue, the media will be returned as a data URI and the output data won't be available in the request history.- Default:
false
- Default:
num_images(integer, optional):
The number of images to generate. This is always set to 1 for streaming output. Default value:1- Default:
1 - Range:
1to4
- Default:
enable_safety_checker(boolean, optional):
If set to true, the safety checker will be enabled. Default value:true- Default:
true
- Default:
output_format(OutputFormatEnum, optional):
The format of the generated image. Default value: "jpeg"- Default: "jpeg"
- Options: "jpeg", "png"
acceleration(AccelerationEnum, optional):
Acceleration level for image generation. 'regular' balances speed and quality. Default value: "none"- Default: "none"
- Options: "none", "regular"
Required Parameters Example:
{
"prompt": "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word \"FLUX\" is painted over it in big, white brush strokes with visible texture."
}
Full Example:
{
"prompt": "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word \"FLUX\" is painted over it in big, white brush strokes with visible texture.",
"image_size": "landscape_4_3",
"num_inference_steps": 28,
"guidance_scale": 3.5,
"num_images": 1,
"enable_safety_checker": true,
"output_format": "jpeg",
"acceleration": "none"
}
Output Schema
The API returns the following output format:
images(list<Image>, required):
The generated image files info.- Array of Image
timings(Timings, required)seed(integer, required):
Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed.has_nsfw_concepts(list<boolean>, required):
Whether the generated images contain NSFW concepts.- Array of boolean
prompt(string, required):
The prompt used for generating the image.
Example Response:
{
"images": [
{
"url": "",
"content_type": "image/jpeg"
}
],
"prompt": ""
}
Usage Examples
cURL
curl --request POST \
--url https://fal.run/fal-ai/flux-lora \
--header "Authorization: Key $FAL_KEY" \
--header "Content-Type: application/json" \
--data '{
"prompt": "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word \"FLUX\" is painted over it in big, white brush strokes with visible texture."
}'
Python
Ensure you have the Python client installed:
pip install fal-client
Then use the API client to make requests:
import fal_client
def on_queue_update(update):
if isinstance(update, fal_client.InProgress):
for log in update.logs:
print(log["message"])
result = fal_client.subscribe(
"fal-ai/flux-lora",
arguments={
"prompt": "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word \"FLUX\" is painted over it in big, white brush strokes with visible texture."
},
with_logs=True,
on_queue_update=on_queue_update,
)
print(result)
JavaScript
Ensure you have the JavaScript client installed:
npm install --save @fal-ai/client
Then use the API client to make requests:
import { fal } from "@fal-ai/client";
const result = await fal.subscribe("fal-ai/flux-lora", {
input: {
prompt: "Extreme close-up of a single tiger eye, direct frontal view. Detailed iris and pupil. Sharp focus on eye texture and color. Natural lighting to capture authentic eye shine and depth. The word \"FLUX\" is painted over it in big, white brush strokes with visible texture."
},
logs: true,
onQueueUpdate: (update) => {
if (update.status === "IN_PROGRESS") {
update.logs.map((log) => log.message).forEach(console.log);
}
},
});
console.log(result.data);
console.log(result.requestId);