
FLUX.2 Flex Edit API by Black Forest Labs
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
| Parameter | Type | Default | Range | Description |
|---|---|---|---|---|
prompt | string | — | — | Text description of the desired edit. Required. |
images | array | — | 1–8 items | One or more reference images. Each item is a URL or Base64-encoded string. Required. |
width | integer | 1024 | 256–2048 | Width of the output image in pixels. |
height | integer | 1024 | 256–2048 | Height of the output image in pixels. |
steps | integer | 50 | 1–50 | Number of diffusion inference steps. Lower values are faster; higher values produce maximum fidelity. |
guidance | number | 5 | 1.5–10 | Guidance scale controlling how strictly the model follows the prompt. Higher values increase prompt adherence. |
enable_prompt_expansion | boolean | true | — | When enabled, the model automatically expands short prompts to improve output quality. |
output_format | string | jpeg | jpeg, png | Output image format. |
safety_tolerance | integer | 2 | 0–5 | Moderation strictness level. 0 = most strict, 5 = least strict. |
seed | integer | -1 | — | Random 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 Range | Recommended Use |
|---|---|
| 6–20 | Rapid prototyping, fast iteration |
| 20–40 | Balanced quality for general use |
| 40–50 | Maximum 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
| SKU | Description | Unit Price |
|---|---|---|
sku_mp | Per 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 Resolution | Reference Images | Reference MP | Output MP | Total MP | Cost |
|---|---|---|---|---|---|
| 1024×1024 (1 MP) | 1 × 1024×1024 image (1 MP) | 1 MP | 1 MP | 2 MP | $0.100 |
| 1024×1024 (1 MP) | 3 images (1 MP each, flat) | 3 MP | 1 MP | 4 MP | $0.200 |
| 2048×2048 (4 MP) | 1 × 2048×2048 image (4 MP) | 4 MP | 4 MP | 8 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.


















