Skip to content

Quickstart with fal

In this example, we’ll be using one of our most popular model endpoints.

Before we proceed, you need to create an API key.

This key will be used to authenticate your requests to the fal API.

Terminal window
npm install --save @fal-ai/client
fal.config({
credentials: "PASTE_YOUR_FAL_KEY_HERE",
});

Now you can call our Model API endpoint using the fal client:

import { fal } from "@fal-ai/client";
const result = await fal.subscribe("fal-ai/flux/dev", {
input: {
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",
},
});

We have made other popular models such as Flux Realism, Flux Lora Training 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.

Check out our Model Playgrounds to tinker with these models and let us know on our Discord 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.