Documentation
Quickstart with Model Registry

Quickstart with fal's Model Registry

We have made popular models such as Stable Diffusion XL, ControlNet, Whisper and more available as ready-to-use APIs so that you can easily integrate them into your applications.

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.

Model Registry Quickstart

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 LORAss.

Before we proceed, you need to create an API key and a secret (opens in a new tab).

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

fal.config({
  credentials: "FAL_KEY_ID:FAL_KEY_SECRET",
});

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

const result = await fal.subscribe("110602490-lora", {
  input: {
    model_name: "stabilityai/stable-diffusion-xl-base-1.0",
    prompt:
      "Photo of a european medieval 40 year old queen, silver hair, highly detailed face, detailed eyes, head shot, intricate crown, age spots, wrinkles",
  },
  logs: true,
  onQueueUpdate: (update) => {
    if (update.status === "IN_PROGRESS") {
      update.logs.map((log) => log.message).forEach(console.log);
    }
  },
});

2023 © Features and Labels Inc.