skillfed

fal-client

Python client for fal.ai

fal-client v1.0.0 3.2M downloads/30d#2,701 on PyPI947
License unclear Active released

What it is and what it does

fal-client is a Python library that wraps the fal.ai ML model inference API, letting you call deployed models (like image generators and audio processors) from Python code. It handles both blocking and async calls, file uploads to fal.ai's CDN, in-memory data URL encoding, and request queuing with status polling and log streaming.

The package is built on httpx, websockets, and async utilities, so it integrates naturally into async Python applications. You authenticate with an API key, then call models by name with a dictionary of arguments—the client handles serialization, network I/O, and response parsing. It's a thin, purpose-built wrapper for fal.ai's inference service, not a general ML framework.

Use it for:

  • Call image generation models (e.g., SDXL) from Python scripts or web services without managing your own GPU infrastructure.
  • Process audio files with fal.ai's Whisper deployment by uploading or encoding audio and retrieving transcriptions.
  • Build async pipelines that submit long-running model jobs and stream logs and status updates as they progress.
  • Integrate fal.ai model inference into FastAPI or other async web frameworks without blocking.
  • Upload local files to fal.ai's CDN and pass their URLs to models that require file inputs.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python client library for calling ML models deployed on fal.ai, supporting both synchronous and asynchronous requests, file uploads, and status polling.

Yes, if you are already using fal.ai and want a straightforward Python interface. The package is actively maintained, has low install friction, and provides both sync and async APIs. However, verify the license terms first—the metadata does not specify one—and confirm that fal.ai's pricing and availability align with your use case.

Install

fal-client on PyPI

pip

pip install fal-client

uv

uv add fal-client

poetry

poetry add fal-client

Installing fal-client

Before you install

Low install friction with a pure-Python wheel and six well-maintained async-focused dependencies (aiofiles, asyncstdlib, httpx, httpx-sse, msgpack, websockets). The package is actively maintained with recent commits and has reached version 1.0.0.

License in practice

License treatment is unclear—no SPDX identifier or raw license text is available in the metadata. Verify the actual license before using in proprietary or restricted contexts.

Quickstart

pip install fal-client

import fal_client

response = fal_client.run("fal-ai/fast-sdxl", arguments={"prompt": "a cute cat"})
print(response["images"][0]["url"])

Requires a FAL_KEY environment variable set to a valid fal.ai API key.

Verify before relying

  • Actual license terms and conditions for commercial or proprietary use.
  • Rate limiting, quota, or cost implications of calling fal.ai models through this client.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 6 — aiofiles, asyncstdlib, httpx, httpx-sse, msgpack, websockets
Maintenance actively maintained — 108 days since the last release
Last repo commit
First released
Downloads 3,206,142/month — #2,701 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: fal_client-1.0.0-py3-none-any.whl

Tags

fal.ai python clientml model api clientasync ml inferencefile upload to ml apimodel queuing and polling
ml-inferenceasync-httpapi-client

More Artificial Intelligence packages