Skip to content

Black Forest Labs

BlackForestLabsProvider in the Vercel.AI.BlackForestLabs namespace creates the Black Forest Labs models that this port implements. The API reference lists every option: BlackForestLabsProvider.

Browse the upstream catalog of Black Forest Labs models and their pricing on the Vercel AI Gateway models page.

Kind Factory method Model ids in this port’s tests and docs
Image Image, ImageModel flux-pro-1.1, flux-pro-1.1-ultra
Video Video, VideoModel flux-3-video

A model id in the table is one that the tests or docs use. It is not the complete list of ids the provider accepts. Pass any id that the provider documents. An id that links to the Vercel AI Gateway catalog has a Gateway slug listed there.

Image model:

var model = (IImageCaller)BlackForestLabsProvider.Create().ImageModel("flux-pro-1.1");
var result = await GenerateImage.GenerateImageAsync(
new GenerateImageRequest { Model = model, Text = "A red apple sticker" }
);
await File.WriteAllBytesAsync("image.png", result.Image.Data!);

snippet source | anchor

See the Providers guide for authentication and provider options.

Apache-2.0 · Copyright 2023 Vercel, Inc. · unofficial community port, not an official Vercel product