> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# fal

> Run hosted generative AI models synchronously or through the fal queue API

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key comes from `FAL_KEY`.
* **Docs**: [https://fal.ai/docs/model-apis/model-endpoints/queue](https://fal.ai/docs/model-apis/model-endpoints/queue)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable  | Required | Description                                                                                   |
| --------- | -------- | --------------------------------------------------------------------------------------------- |
| `FAL_KEY` | Yes      | fal API key (sent as 'Authorization: Key \<FAL\_KEY>') [Docs](https://fal.ai/dashboard/keys). |

## Setup

1. **Create a fal account**: Sign up at [https://fal.ai](https://fal.ai) - new accounts get free credits to try models before adding billing.
2. **Create an API key**: Open [https://fal.ai/dashboard/keys](https://fal.ai/dashboard/keys), create a key, and copy it immediately - it is only shown once.
3. **Store the key**: Add it to your .env file as FAL\_KEY=.... - requests authenticate with the header 'Authorization: Key \<FAL\_KEY>'.
4. **Pick a model and verify**: Browse [https://fal.ai/models](https://fal.ai/models) and copy a model endpoint ID (e.g. fal-ai/flux/schnell). Pass its segments as app\_owner=fal-ai, app\_id=flux, app\_variant=schnell to the Run Model tool with a small input payload.

* Each model has its own input schema - check the model's API tab on fal.ai/models for required fields
* Use the queue tools (submit → status → result) for slow models like video generation; synchronous fal.run requests can time out
* Queue status/result/cancel URLs use the base app ID without the variant segment (fal returns ready-made status\_url and response\_url in the submit response)
* Model runs are billed per inference - check the model page for pricing

Provider API reference: [https://fal.ai/docs](https://fal.ai/docs)

## Tools

| Tool                 | Access | Description                                                                                                                                                                                |
| -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Run Model            | Write  | Run a fal model synchronously and wait for the result (best for fast models; billed per run). The model endpoint ID is split into owner / app / variant segments, e.g. fal-ai/flux/schnell |
| Submit Queue Request | Write  | Submit a request to the fal queue and return immediately with a request\_id (billed per run)                                                                                               |
| Get Queue Status     | Read   | Check the status of a queued request (IN\_QUEUE, IN\_PROGRESS, or COMPLETED). Use the base app ID without the variant segment, matching the status\_url returned at submit time            |
| Get Queue Result     | Read   | Fetch the result of a completed queue request. Use the base app ID without the variant segment, matching the response\_url returned at submit time                                         |
| Cancel Queue Request | Write  | Cancel a queued request that has not started running yet                                                                                                                                   |

## Example prompts

* Run the fal-ai/flux/schnell model on fal with a prompt I provide and show me the resulting image URL.
* Submit a request to a fal model via the queue, then poll its status and fetch the result when it completes.
