Quick Example
Generate an image in three lines of code. Install the client, set your API key, and call a model.How It Works
Every model on fal is exposed as an HTTP endpoint. You can call it directly, or go through the queue for automatic retries, status tracking, and scaling. There are several calling patterns depending on your use case. Direct (run) sends a synchronous HTTP request to fal.run and returns the result directly. This is the simplest approach for quick scripts and prototyping.
Subscribe uses the queue under the hood but handles polling automatically, so it feels synchronous. This is what the Quick Example above uses.
Asynchronous (submit) gives you full control over the queue. Submit a request and return immediately, then poll for status or receive results via webhook. This is the recommended approach for production workloads with parallel processing.
Streaming delivers output progressively as the model generates it. This is useful for LLMs that produce tokens incrementally, or for showing generation progress in a UI.
realtime() uses WebSockets for persistent connections, bypassing the queue entirely for sub-100ms latency. Only available for models with an explicit real-time endpoint.
What You Can Generate
The model gallery has 1,000+ models spanning several categories. Here are some popular starting points.Image Generation and Editing

Nano Banana 2

Nano Banana Pro

Flux 2 Flex

Recraft V4 Pro

Nano Banana 2 Edit

FLUX Kontext Pro
Video Generation

Veo 3.1

Kling 3.0 Pro

Kling O3

Sora 2

LTX-2 19B

Sora 2 Pro
Audio and Speech

Chatterbox TTS

MiniMax Speech-02 HD

Dia TTS

Beatoven Music

Beatoven SFX
