Download the PHP package cjmellor/fal-ai-laravel without Composer

On this page you can find all versions of the php package cjmellor/fal-ai-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package fal-ai-laravel

Fal AI Laravel SDK Banner

Fal.ai Laravel Package

Latest Version on Packagist GitHub Tests Action Status Total Downloads Packagist PHP Version Laravel Version

A Laravel package for integrating with the Fal.ai API, providing a fluent interface for AI model execution with built-in webhook support, streaming, and Platform APIs.

[!NOTE] Multi-provider support: This package also includes a Replicate.com.

Features

[!WARNING] Upgrading from v1.x? Version 2.0 is a complete architectural rewrite with breaking changes. The configuration structure, API methods, and class namespaces have all changed. You must follow the Upgrade Guide to migrate from v1.x to v2.x.

Installation

Install via Composer:

Publish the configuration:

Add your API key to .env:

Basic Usage

Using a Default Model

Set a default model in your config to omit the model ID:

Queue vs Sync Modes

Queue Mode (Default)

Requests are processed asynchronously. Use webhooks or polling to get results.

Best for: Complex generations, batch processing, production workloads.

Sync Mode

Requests block until complete and return the result directly.

Best for: Simple generations, interactive applications, development.

[!WARNING] Sync mode may timeout for complex requests.

Polling Status & Results

For queued requests, poll for status and retrieve results:

Response Helpers

Streaming

Stream responses in real-time using Server-Sent Events:

[!NOTE] Not all models support streaming. Check model documentation.

Webhook Support

Setting a Webhook URL

Adding a webhook automatically uses queue mode:

[!IMPORTANT] Webhook URLs must use HTTPS and be publicly accessible.

Built-in Webhook Route

The package provides a pre-configured route at /webhooks/fal:

Custom Webhook Endpoint

Create your own endpoint with the verification middleware:

Manual Verification

Webhook Payload

Success:

Error:

Platform APIs

Access Fal.ai Platform APIs for pricing, usage, and analytics.

Pricing

Cost Estimation

Usage

Analytics

Delete Request Payloads

Remove stored input/output data for a request:

Fluent API

Dynamic Methods

Method names are converted from camelCase to snake_case:

Bulk Data

Immutable Methods

Create new instances without modifying the original:

Conditional Methods

Configuration

Error Handling


Replicate Driver

This package includes a driver for Replicate.com.

Setup

Add your Replicate API key to .env:

Usage

Model Format

Replicate models can use two formats:

Official Models:

Custom Models (with specific version):

[!NOTE] The :version suffix is only required for custom models. Official Replicate models use just owner/model.

Checking Status

Replicate uses polling for status:

Key Differences from Fal

Feature Fal.ai Replicate
Queue/Sync modes Yes No (always async)
Streaming Yes No (use polling)
Platform APIs Yes No
Deployments API No Yes
Webhooks Yes Yes

Replicate Webhooks

Built-in route available at /webhooks/replicate.

Configure webhook verification in .env:

Deployments

Manage Replicate deployments for auto-scaling model inference.

Create a Deployment

Available Hardware: cpu, gpu-t4, gpu-l40s, gpu-l40s-2x, gpu-a100-large, gpu-a100-large-2x, gpu-h100

List Deployments

Get, Update, Delete

Run Predictions via Deployment


Testing

Security

[!IMPORTANT] Webhook Verification:

  • Fal.ai: ED25519 signatures with JWKS
  • Replicate: HMAC-SHA256 signatures

Always use HTTPS for webhook URLs and keep API keys secure.

Contributing

Contributions are welcome! Please submit a Pull Request.

License

MIT License. See LICENSE for details.


All versions of fal-ai-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
hosmelq/sse-saloon Version ^0.1.0
illuminate/support Version ^12.0|^13.0
saloonphp/saloon Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cjmellor/fal-ai-laravel contains the following files

Loading the files please wait ...