aisdk/black-forest-labs

Official Black Forest Labs provider for the PHP AI SDK.

Maintainers

Package info

github.com/phpaisdk/black-forest-labs

pkg:composer/aisdk/black-forest-labs

Transparency log

Fund package maintenance!

Open Collective

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.8.1 2026-07-22 06:41 UTC

This package is auto-updated.

Last update: 2026-07-22 06:41:35 UTC


README

GitHub Workflow Status Latest Version License

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

Installation

composer require aisdk/black-forest-labs

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

Variable Description Default
BFL_API_KEY API key for authentication Required
BFL_BASE_URL Base URL for API requests https://api.bfl.ai/v1

Supported Capabilities

Capability Support
Text-to-image generation Native
Async job polling Native

The 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