首頁
探索
black-forest-labs/flux-2-flex/edit
FLUX.2 Flex Edit
圖生圖

FLUX.2 Flex Edit API by Black Forest Labs

black-forest-labs/flux-2-flex/edit
Edit

FLUX.2 Flex Edit is a professional image editing model specialized for typography, fine detail preservation, and production workflows. It provides adjustable inference steps and guidance scale, with multi-reference support for up to 8 images, delivering precise control over photorealistic editing results up to 4MP.

FLUX.2 Flex — Edit (Image Editing)

Developer: Black Forest Labs
Model ID: black-forest-labs/flux-2-flex/edit
Release Date: February 23, 2026

Overview

FLUX.2 Flex Edit is a professional image editing model specialized for typography, fine detail preservation, and production workflows requiring precise customization. Built on the same latent flow matching architecture as FLUX.2 Flex, it accepts a text prompt alongside one or more reference images, enabling targeted edits, subject replacement, style transfer, and multi-reference identity-consistent generation — all without fine-tuning.

It provides adjustable inference steps (1–50) and guidance scale (1.5–10) for fine-grained control over the diffusion process. The latest version is up to 3× faster than previous FLUX.2 Flex releases while maintaining the same high output quality. Supports up to 8 reference images per request.

Key Capabilities

  • Superior typography — Reliable text rendering for complex typography, infographics, memes, UI mockups, and marketing materials with legible fine text.
  • Adjustable inference parameters — Fine-grained control through configurable steps (1–50) and guidance scale (1.5–10) to balance quality, speed, and prompt adherence.
  • Multi-reference support — Up to 8 reference images for consistent character, product, or style generation across compositions.
  • High-resolution output up to 4MP — Flexible aspect ratios with an improved VAE achieving 63.5% better learnability (gFID) and 84.1% better reconstruction quality (LPIPS) versus prior architectures.
  • HEX color accuracy — Precise color matching using hex color codes for brand-accurate asset creation.
  • Prompt expansion — Optional automatic prompt enrichment to improve output quality from short or simple prompts.

Use Cases

  • Image editing — Edit existing images through text instructions: change backgrounds, swap textures, alter objects, or relight scenes with fine-grained control.
  • Multi-reference generation — Maintain character, product, or style consistency across compositions using multiple reference images.
  • Typography and text-heavy editing — Apply precise text edits, add labels, overlays, or redesign layout elements with accurate rendering.
  • E-commerce asset creation — Product variations, environment swaps, and label editing for marketing materials.
  • Brand asset consistency — Generate a series of brand-consistent images from a set of reference shots with exact hex-color accuracy.
  • Iterative refinement — Refine images through successive edits while maintaining overall visual coherence, using adjustable steps for speed/quality balance.

Input Parameters

ParameterTypeDefaultRangeDescription
promptstringText description of the desired edit. Required.
imagesarray1–8 itemsOne or more reference images. Each item is a URL or Base64-encoded string. Required.
widthinteger1024256–2048Width of the output image in pixels.
heightinteger1024256–2048Height of the output image in pixels.
stepsinteger501–50Number of diffusion inference steps. Lower values are faster; higher values produce maximum fidelity.
guidancenumber51.5–10Guidance scale controlling how strictly the model follows the prompt. Higher values increase prompt adherence.
enable_prompt_expansionbooleantrueWhen enabled, the model automatically expands short prompts to improve output quality.
output_formatstringjpegjpeg, pngOutput image format.
safety_toleranceinteger20–5Moderation strictness level. 0 = most strict, 5 = least strict.
seedinteger-1Random seed for reproducibility. Use -1 for a random seed.

Note on images: Each item can be a publicly accessible image URL or a Base64-encoded image string (e.g., data:image/jpeg;base64,...). When only one reference image is provided, its actual resolution is used for billing. When multiple images are provided, each is billed at a flat 1 MP rate.

Steps vs. Quality Trade-off

Steps RangeRecommended Use
6–20Rapid prototyping, fast iteration
20–40Balanced quality for general use
40–50Maximum fidelity for final deliverables

Output

Returns a URL to the edited image. The model supports asynchronous generation: the response first contains a polling URL, which resolves to the final image once processing is complete.

Output formats: JPEG, PNG Maximum output resolution: 4 megapixels (e.g., 2048×2048)

Note: FLUX.2 Flex exhibits higher latency compared to FLUX.2 Pro, reflecting its emphasis on quality and fine-grained customization over raw speed.

Pricing

Pricing covers both the generated output image and the reference input image(s), each measured in megapixels (MP). 1 MP = 1,048,576 pixels. Resolution is capped at 4 MP for billing purposes. A single flat per-megapixel rate applies to both generated and reference images.

SKUs

SKUDescriptionUnit Price
sku_mpPer megapixel for both the generated output image and each reference input image (up to 4 MP each)$0.05

Formula

cost = (min(4, ceil(width × height / 1,048,576)) + reference_image_mp) × sku_mp

Where reference_image_mp is:

  • Multiple images (len(images) > 1): each image is billed at 1 MP flat:

    reference_image_mp = len(images)
  • Single image (len(images) == 1): actual resolution of the image is used (capped at 4 MP):

    reference_image_mp = min(4, ceil(GetImagePixelsFromURL(images[0]) / 1,048,576))

Examples

Output ResolutionReference ImagesReference MPOutput MPTotal MPCost
1024×1024 (1 MP)1 × 1024×1024 image (1 MP)1 MP1 MP2 MP$0.100
1024×1024 (1 MP)3 images (1 MP each, flat)3 MP1 MP4 MP$0.200
2048×2048 (4 MP)1 × 2048×2048 image (4 MP)4 MP4 MP8 MP$0.400

When a single reference image is provided, its actual pixel count is fetched at billing time. If the image URL is inaccessible or returns an error, billing fails and the request is not charged.

探索類似模型

一個 API,暢享全模態 AI。

探索全部模型

Join our Discord community

Join the Discord community for the latest model updates, prompts, and support.