Quickstart with fal
In this example, we'll be using one of our most popular model endpoints (opens in a new tab). This model endpoint can handle a wide range of Stable Diffusion models, including SD fine tunes, SDXL and LORAs.
Before we proceed, you need to create an API key (opens in a new tab).
This key will be used to authenticate your requests to the fal API.
npm install --save @fal-ai/serverless-client
fal.config({
credentials: "PASTE_YOUR_FAL_KEY_HERE",
});
Now you can call our Model API endpoint using the fal client:
import * as fal from "@fal-ai/serverless-client";
const result = await fal.subscribe("fal-ai/lora", {
input: {
model_name: "stabilityai/stable-diffusion-xl-base-1.0",
prompt:
"Photo of a rhino dressed suit and tie sitting at a table in a bar with a bar stools, award winning photography, Elke vogelsang",
},
logs: true,
onQueueUpdate: (update) => {
if (update.status === "IN_PROGRESS") {
update.logs.map((log) => log.message).forEach(console.log);
}
},
});
We have made other popular models such as SDXL Finetunes, Stable Video Diffusion, ControlNets, Whisper and more available as ready-to-use APIs so that you can easily integrate them into your applications.
AuraFlow
AuraFlow v0.1 is an open-source flow-based text-to-image generation model that achieves state-of-the-art results on GenEval. The model is currently in beta.
FLUX.1 [dev]
FLUX.1 [dev] is a 12 billion parameter flow transformer that generates high-quality images from text. It is suitable for personal and commercial use.
FLUX.1 [dev] with LoRAs
Super fast endpoint for the FLUX.1 [dev] model with LoRA support.
FLUX Realism LoRA
FLUX Realism LoRA is a cutting edge model for generating realistic images with the SOTA Flux Model.
FLUX.1 [schnell]
FLUX.1 [schnell] is a 12 billion parameter flow transformer that generates high-quality images from text in 1 to 4 steps, suitable for personal and commercial use.
FLUX.1 [pro]
The leading version of FLUX.1, served in partnership with BFL
Check out our Model Playgrounds (opens in a new tab) to tinker with these models and let us know on our Discord (opens in a new tab) if you want to see other ones listed.
Once you find a model that you want to use, you can grab its URL from the “API” tab. The API tab provides some important information about the model including its source code and examples of how you can call it.