Skip to content
Black Forest Labs logo

FLUX.2 [pro] Preview

Text-to-ImageBlack Forest LabsProxied

FLUX.2 [pro] Preview is Black Forest Labs' recommended default for production image generation and editing — tracks the latest [pro] weights with strong multi-reference support.

Model Info
Terms and Licenselink
More informationlink
PricingView pricing in the Cloudflare dashboard

Usage

TypeScript
const response = await env.AI.run(
'black-forest-labs/flux-2-pro-preview',
{
prompt:
'A serene mountain landscape at golden hour, soft diffused light filtering through clouds',
height: 1024,
width: 1024,
},
)
console.log(response)
Simple Prompt

Examples

Multi-Reference Editing — Multi-reference editing — combine two reference images in a single composition
TypeScript
const response = await env.AI.run(
'black-forest-labs/flux-2-pro-preview',
{
prompt: 'Combine the subjects of these images into a single editorial fashion scene',
input_images: [
'https://replicate.delivery/xezq/jCypj4MeXYUiRyq7nfgm8z1OvFZF81wh4FznutDsZOuJz0YWA/tmp1iukn307.jpg',
'https://replicate.delivery/xezq/0lxxNQSg3NabCZrDiQVAPGVmjP1Q2dd7TgYCOTfI9LpyZaMLA/tmp89gopylq.jpg',
],
},
)
console.log(response)
Multi-Reference Editing
Reproducible PNG Output — Seeded generation with PNG output for downstream editing pipelines
TypeScript
const response = await env.AI.run(
'black-forest-labs/flux-2-pro-preview',
{ prompt: 'A pastel watercolor of a koi pond at sunrise', output_format: 'png', seed: 1337 },
)
console.log(response)
Reproducible PNG Output

Parameters

height
integermaximum: 9007199254740991minimum: 64Height of the generated image in pixels (minimum 64). Omit to let BFL pick.
output_format
stringenum: jpeg, png, webpOutput image format. Defaults to jpeg.
prompt
stringrequiredText prompt for image generation or editing.
safety_tolerance
integermaximum: 5minimum: 0Tolerance for input/output moderation. 0 is the strictest, 5 the most permissive. Defaults to 2.
seed
integermaximum: 9007199254740991minimum: -9007199254740991Optional seed for reproducible generation.
width
integermaximum: 9007199254740991minimum: 64Width of the generated image in pixels (minimum 64). Omit to let BFL pick.

API Schemas (Raw)

Input
Output