PHPackages                             aisdk/black-forest-labs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. aisdk/black-forest-labs

ActiveLibrary

aisdk/black-forest-labs
=======================

Official Black Forest Labs provider for the PHP AI SDK.

v0.8.1(yesterday)01↑2900%MITPHP ^8.3

Since Jul 22Compare

[ Source](https://github.com/phpaisdk/black-forest-labs)[ Packagist](https://packagist.org/packages/aisdk/black-forest-labs)[ Docs](https://github.com/phpaisdk/black-forest-labs)[ Fund](https://opencollective.com/phpaisdk)[ RSS](/packages/aisdk-black-forest-labs/feed)WikiDiscussions Synced today

READMEChangelog (2)Dependencies (5)Versions (3)Used By (0)

aisdk/black-forest-labs
=======================

[](#aisdkblack-forest-labs)

[![GitHub Workflow Status](https://camo.githubusercontent.com/35ea2e4b8c46d5c35939265e2f717b6c21abde7dcd9ce465aec6b5f70dc561dc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f706870616973646b2f626c61636b2d666f726573742d6c6162732f74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d5465737473)](https://github.com/phpaisdk/black-forest-labs/actions)[![Latest Version](https://camo.githubusercontent.com/27a40092b250748d940b4571da024bde94bb53e1e3e93f09aef9e57a3859aa3d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f616973646b2f626c61636b2d666f726573742d6c616273)](https://packagist.org/packages/aisdk/black-forest-labs)[![License](https://camo.githubusercontent.com/e220b8fd5bfaf478c7b411db8eba88a1a0cafdfe87b5165d9dfa359139e88aff/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f616973646b2f626c61636b2d666f726573742d6c616273)](https://packagist.org/packages/aisdk/black-forest-labs)

---

Official Black Forest Labs provider for the PHP AI SDK. Uses BFL's native FLUX image-generation API.

Installation
------------

[](#installation)

```
composer require aisdk/black-forest-labs
```

Basic Usage
-----------

[](#basic-usage)

```
use AiSdk\BlackForestLabs;
use AiSdk\Generate;

BlackForestLabs::create(['apiKey' => $_ENV['BFL_API_KEY']]);
$image = Generate::image('A cinematic mountain lake at sunrise')
    ->model(BlackForestLabs::model('flux-2-pro-preview'))
    ->size('1440x810')
    ->run();
```

Configuration
-------------

[](#configuration)

VariableDescriptionDefault`BFL_API_KEY`API key for authenticationRequired`BFL_BASE_URL`Base URL for API requests`https://api.bfl.ai/v1`Supported Capabilities
----------------------

[](#supported-capabilities)

CapabilitySupportText-to-image generationNativeAsync job pollingNativeThe provider submits a native FLUX request, polls BFL's returned `polling_url`, and returns the signed image URL. Use `providerOptions('blackforestlabs', ['raw' => [...]])` for documented BFL image fields outside the portable SDK surface.

Documentation
-------------

[](#documentation)

- [BFL FLUX image-generation documentation](https://docs.bfl.ai/flux_2/flux2_text_to_image)
- [PHP AI SDK documentation](https://phpaisdk.com/docs/black-forest-labs)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ef29d1962da41e7526023f215cf844494e209b2fd163742084cb919a3b508021?d=identicon)[aisdk](/maintainers/aisdk)

---

Tags

aifluximage-generationblack-forest-labsaisdk

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aisdk-black-forest-labs/health.svg)

```
[![Health](https://phpackages.com/badges/aisdk-black-forest-labs/health.svg)](https://phpackages.com/packages/aisdk-black-forest-labs)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
