Documentation Index
Fetch the complete documentation index at: https://mintlify.com/phpaisdk/fal/llms.txt
Use this file to discover all available pages before exploring further.
FalProvider (class AiSdk\Fal\FalProvider) is the concrete provider class that implements ImageProviderInterface, SpeechProviderInterface, TranscriptionProviderInterface, and VideoProviderInterface. Obtain one via Fal::create() or Fal::default().
Constructor
A
FalOptions instance holding the API key, base URL, headers, and poll timeouts. Normally not called directly — use Fal::create() which builds the FalOptions object for you.Methods
name()
Returns the provider name string used to identify this provider.
Always returns
'fal'.Model dispatch methods
FalProvider exposes four protected model factory methods that are invoked automatically by the BaseProvider dispatch mechanism when you call Fal::model() or pass a model ID to a generation helper such as Generate::image()->model(...). You do not call these methods directly.
| Method | Visibility | Return type | Triggered by |
|---|---|---|---|
imageModel(string $modelId) | protected | ImageModelInterface | Generate::image() context |
speechModel(string $modelId) | protected | SpeechModelInterface | Generate::speech() context |
transcriptionModel(string $modelId) | protected | TranscriptionModelInterface | Generate::transcription() context |
videoModel(string $modelId) | protected | VideoModelInterface | Generate::video() context |
Fal::model() or the generation helpers:
Example
Attempting to use an unsupported modality (e.g. language model or embedding) will throw
NoSuchModelException from aisdk/core — fal.ai does not offer those modalities through this package.Implemented Interfaces
FalProvider extends BaseProvider and fulfils the following contracts:
| Interface | Protected method | Return type |
|---|---|---|
ImageProviderInterface | imageModel(string $modelId) | ImageModelInterface |
SpeechProviderInterface | speechModel(string $modelId) | SpeechModelInterface |
TranscriptionProviderInterface | transcriptionModel(string $modelId) | TranscriptionModelInterface |
VideoProviderInterface | videoModel(string $modelId) | VideoModelInterface |
