Before installing, make sure your environment meets the following prerequisites: PHP 8.3 or higher, Composer (any recent version), and a fal.ai API key obtained from your fal.ai dashboard. No other runtime dependencies need to be configured manually.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.
Composer Install
Require the package
Run the following command in your project root to add
aisdk/fal and its dependencies:Obtain a fal.ai API key
Sign in to fal.ai and navigate to your account settings to create an API key. Keep this key secure and never commit it to version control.
Set the environment variable
Export your API key before running your application. The provider reads You can also set this in a
FAL_API_KEY automatically:.env file and load it with your preferred environment-loading library, or pass it directly as apiKey when calling Fal::create().The provider also recognises FAL_KEY as a fallback key name (matching the upstream JavaScript SDK convention), and FAL_BASE_URL to override the default https://fal.run base URL.Package Details
| Property | Value |
|---|---|
| Packagist | aisdk/fal |
| PHP requirement | ^8.3 |
| Core dependency | aisdk/core ^0.8.0 |
| License | MIT |
aisdk/core is a required dependency of aisdk/fal and is pulled in automatically by Composer — you do not need to require it separately in your composer.json.