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
01example.shBASH
01pip install fal-client
First call
01example.pyPYTHON
01import fal_client
02
03result = fal_client.subscribe(
04 "fal-ai/ernie-image",
05 arguments={
06 "prompt": "A vertical coffee shop poster. Large centered headline reads 'MORNING POUR' i...",
07 "aspect_ratio": "1:1",
08 "num_images": 1,
09 "enable_prompt_enhancer": true,
10 "num_inference_steps": 50,
11 "seed": 0
12 },
13 with_logs=True,
14)
15
16print(result)
Python
fal-client on PyPI
Node / TypeScript
@fal-ai/client on npm
Source
fal-ai on GitHub
Also reading