aisdk/fal

Official fal provider for the PHP AI SDK.

Maintainers

Package info

github.com/phpaisdk/fal

pkg:composer/aisdk/fal

Transparency log

Fund package maintenance!

Open Collective

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.8.0 2026-07-15 12:23 UTC

This package is auto-updated.

Last update: 2026-07-17 02:24:46 UTC


README

GitHub Workflow Status Total Downloads Latest Version License Why PHP in 2026

The fal provider package for the PHP AI SDK supports image, speech, transcription, and video generation via fal.run and queue.fal.run, aligned with @ai-sdk/fal.

Installation

composer require aisdk/fal

Configuration

Variable Purpose
FAL_API_KEY Primary API key.
FAL_KEY Fallback key name (matches upstream).
FAL_BASE_URL Override default https://fal.run.

Authorization header: Authorization: Key <api-key>.

Usage

Model ids are fal route segments (for example fal-ai/flux/schnell).

use AiSdk\Generate;
use AiSdk\Fal;

$result = Generate::image()
    ->model(Fal::image('fal-ai/flux/schnell'))
    ->prompt('A minimal desk lamp.')
    ->run();
Generate::speech()
    ->model(Fal::speech('fal-ai/minimax/speech-02-hd'))
    ->input('Hello')
    ->run();

Video generation submits to queue.fal.run and polls until a video.url is available (timeouts configurable via videoPollIntervalMs / videoPollTimeoutMs).

Language and embedding modalities are not implemented on fal in this package and throw NoSuchModelException.

Documentation

Community

License

MIT.