SDKs

SDK install and first call

Three canonical paths. The SDKs handle auth, retries, and queue polling; cURL is the baseline when you need to reach the API from anywhere.

Install
BASH
1pip install fal-client
First call
PYTHON
1import fal_client
2
3result = fal_client.subscribe(
4 "fal-ai/gpt-image-2",
5 arguments={
6 "prompt": "A dense East-Asian bodega storefront at dusk, hand-painted signs with the exa...",
7 "safety_tolerance": 2,
8 "size": "1024x1024",
9 "quality": "medium",
10 "num_images": 1
11 },
12 with_logs=True,
13)
14
15print(result)
Python
fal-client on PyPI
Node / TypeScript
@fal-ai/client on npm
Source
fal-ai on GitHub
Also reading