Skip to content

Releases: marceloeatworld/falai-php

v2.0.0 - Complete Rewrite

29 Mar 21:18

Choose a tag to compare

Breaking Changes

This is a complete rewrite of the library. The API is not backward-compatible with v1.

Before (v1)

$falAI = new FalAI('key');
$result = $falAI->generations()->create('fal-ai/flux/schnell', [...]);
$status = $falAI->generations()->checkStatus('model', $result->requestId);

After (v2)

$fal = new FalAI('key');
$result = $fal->run('fal-ai/flux/schnell', [...]);                        // sync
$job = $fal->queue->submit('fal-ai/flux/schnell', [...]);                  // async
$status = $fal->queue->status('fal-ai/flux/schnell', $job->requestId);

What's New

  • Sync execution via fal.run$fal->run('model', [...])
  • Queue workflow via queue.fal.runsubmit, status, result, cancel
  • Subscribe — submit + auto-poll until completion with status callback
  • File upload — upload local files to fal.ai CDN for image-to-image models
  • Webhook support — receive results via webhook
  • fal.ai headers — timeout, priority, runner hint, no-retry
  • Configurable base URLs for all endpoints

Architecture

  • Proper Saloon v4 patterns: custom Authenticator, BaseResource, AlwaysThrowOnErrors, HasTimeout
  • PHP 8.2 readonly DTOs and backed enums (Status, Priority)
  • Separate connectors per domain (queue.fal.run, fal.run, rest.alpha.fal.ai)

Bug Fixes

  • Fix model path truncation (fal-ai/flux/schnell was incorrectly cut to fal-ai/flux)

Security

Requirements

  • PHP 8.2+
  • saloonphp/saloon ^4.0
  • guzzlehttp/guzzle ^7.6

v1.1.0

05 Feb 23:41
290fb2d

Choose a tag to compare

What's Changed

  • Allows usage of versioned models by @Bloafer in #2

New Contributors

Full Changelog: v1.0.0...v1.1.0

v1.0.0

20 Nov 01:38

Choose a tag to compare