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 interactions with built-in webhook support.

Features

Installation

Install the package via Composer:

Publish the configuration file:

Add your Fal.ai API key to your .env file:

Basic Usage

Simple Request

Queue vs Sync Modes

[!TIP] Queue mode is the default and recommended for most use cases. It's perfect for complex generations that take time to process.

Queue Mode (Default)

Use queue mode when:

Sync Mode

Use sync mode when:

[!WARNING] Sync mode may timeout for complex requests. Use queue mode for production applications.

Webhook Support

[!NOTE] For comprehensive webhook documentation, see the Webhook Guide

Making Requests with Webhooks

When you add a webhook URL to your request, it automatically switches to queue mode:

Webhook URL Requirements

Setting Up Webhook Endpoints

You have two options for handling webhooks: use the built-in route or create your own custom endpoint.

Option 1: Built-in Webhook Route (Easiest)

The package includes a pre-configured webhook route at /webhooks/fal that handles basic webhook processing:

[!TIP] The built-in route automatically verifies webhooks and returns appropriate responses. Perfect for getting started quickly!

Option 2: Custom Webhook Endpoint (Recommended for Production)

For production applications, create a custom webhook endpoint with your own processing logic:

Option 3: Manual Verification (Advanced)

For complete control over the verification process:

Webhook Payload Examples

Successful Completion

Error

โš™๏ธ Configuration

[!NOTE] You can customise the package behaviour by publishing and modifying the configuration file.

The configuration file config/fal-ai.php contains the following options:

Environment Variables

Available Models

The package supports all Fal.ai models. Some popular ones include:

FLUX Models (Recommended):

Other Popular Models:

Fluent API Methods

Common Methods

Error Handling

[!IMPORTANT] Always implement proper error handling in production applications to gracefully handle API failures and webhook verification issues.

๐Ÿงช Testing

Run the test suite:

๐Ÿ”’ Security

[!CAUTION] Webhook security is critical for protecting your application from malicious requests. Always use the provided verification mechanisms.

Webhook Security

This package implements Fal.ai's webhook verification using:

Best Practices

[!TIP] Follow these security practices to ensure your webhook endpoints are secure:

  1. Always use HTTPS for webhook URLs
  2. Use the provided middleware for automatic verification
  3. Validate webhook payloads in your application logic
  4. Implement proper error handling and logging
  5. Monitor webhook endpoints for suspicious activity
  6. Use rate limiting on webhook routes
  7. Keep your API keys secure and rotate them regularly

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

๐Ÿ“„ License

This package is open-sourced software licensed under the MIT license.

๐Ÿ’ฌ Support

For support, please open an issue on GitHub or contact the maintainers.


All versions of fal-ai-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
illuminate/support Version ^12.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 ....