FLUX.2 Flex Edit API

blackforestlabs/flux-2-flex/edit
1–8 images · 1K/2K · 8 sizes

FLUX.2 Flex Edit transforms one to eight reference images with text prompts for micro-texture refinement and Hex color control. It preserves subject identity and spatial geometry while enabling nuanced surface adjustments.

Get API Key
Input
Required0/5000
Required0/8
Required
Required
OutputIdle

Generated images will appear here

Estimated Cost: —
Continue Using

Examples

flex-edit-02-output.jpg

Turn the pencil sketch in image 1 into a photorealistic architectural photograph at blue-hour dusk. Follow the sketch geometry precisely: the same A-frame silhouette, stone base, large triangular glass front, narrow deck extending over the lake, chimney on the right roof slope, two pines on the left, and the same camera angle. Build the cabin from the materials in image 2: charred black cedar with alligator texture on the roof slopes, rough dark basalt for the base, brushed copper for the chimney and flashing, and pale oiled oak for the deck. Warm interior light glows through the glass, a thin wisp of smoke rises from the chimney, and the still lake mirrors the cabin under a deep blue sky with the last orange light on the horizon. Crisp material detail, realistic reflections, 24mm architectural lens. No people, no text, no watermark.

flex-edit-03-output.jpg

Edit the map in image 1 by adding only two new hand-drawn elements in the same ink-and-watercolour style: a bold red dashed route line that starts at the small harbour on the south coast, follows the existing dotted trail north through the fern valley, and ends at the lighthouse on the northern cape; and a large hand-painted red X in the middle of the fern valley with a tiny closed wooden treasure chest drawn beside it. Keep every existing element of image 1 exactly as it is, including all six English labels in their original positions ("Whale Bay", "Old Lighthouse", "Fern Valley", "Salt Marsh", "Seal Rocks", "Lantern Harbor"), the coastline, forests, marshes, rocks, compass rose, dotted trails, sailboats, parchment texture and colours. No new text, no watermark.

FLUX.2 Flex Edit

FLUX.2 Flex Edit is Black Forest Labs high-precision image editing and multi-asset blending model. Coupling a 32B flow-matching architecture with a 24B Mistral-3 vision model, it allows creators to submit 1 to 8 reference images to perform micro-surface adjustments while safeguarding subject identity and spatial geometry, outputting up to 2K resolution from 18 credits.

Why Choose FLUX.2 Flex Edit?

  • Granular Micro-Texture ModificationsFine-tune microscopic surface properties such as leather grain, metallic anodization, textile weaves, and weathered patina across reference images.

  • 1 to 8 Multi-Asset CompositingCombine multiple source images sequentially to merge distinct objects, transfer artistic styles, or unify lighting across separate visual components.

  • Hex Color PrecisionSpecify exact hexadecimal color codes directly in edit prompts to alter specific object surfaces to match corporate branding.

  • Native Typography RenderingUpdate packaging, labels, or posters by enclosing desired English text in double quotes for crisp and distortion-free rendering.

  • Aspect Ratio PreservationUse the auto preset to automatically adapt to the aspect ratio of the primary reference image, avoiding manual calculations and distortion.

Parameters

ParameterRequirementDescription
promptRequired

Detailed text prompt describing micro-texture changes, color adjustments, or scene additions. Accepts 3 to 5,000 characters.

image_urlsRequired

Array of 1 to 8 publicly accessible HTTP/HTTPS image URLs for editing reference. Supports JPEG, PNG, and WebP formats.

sizeRequired

Target aspect ratio preset. Supported values: 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, auto.

1:14:33:416:99:163:22:3auto
resolutionRequired

Output rendering resolution: 1K standard HD or 2K ultra-high resolution up to 4MP.

1K2K

How to Use

  1. Upload Reference ImagesHost 1 to 8 source images on publicly reachable HTTP or HTTPS servers supporting standard image headers.

  2. Formulate Detail-Oriented PromptsDescribe tactile adjustments, Hex color codes, and quoted text additions relative to the input images.

  3. Submit the Editing TaskSend an authorized POST request containing prompt, image_urls, size, and resolution to the edit endpoint.

  4. Poll Task ProgressPeriodically poll the task status endpoint until the state switches from running to finished.

  5. Obtain High-Resolution AssetDownload the final rendered image URL from the completed response or receive it via an optional callback_url.

Pricing

Compute-aligned pricing for specialized micro-texture editing tasks, with instant automatic balance refunds on failed requests.

TierRateDetails
1K Standard Resolution18 credits / run · $0.090Covers high-precision editing across all 8 aspect ratios with up to 8 reference images
2K Ultra-High Resolution27 credits / run · $0.135Delivers up to 4MP output capturing intricate surface tactile details, fine textiles, and sharp text

Best Use Cases

  • Luxury Material & Finish RetouchingAlter product textures from glossy plastic to brushed titanium, velvet, or natural marble with authentic light interaction.

  • Artistic Concept Asset CompositingMerge character models, background paintings, and textural overlays into a coherent, atmospheric concept art piece.

  • High-End Packaging Variant CreationGenerate seasonal variants of cosmetic and beverage packaging with custom embossing, foil stamps, and strict Hex colors.

  • Fine Editorial Image Post-ProductionAdjust subtle environmental lighting, color grades, and atmospheric haze across fashion photography without altering facial identity.

Pro Tips

  • Preserve Source Ratio with Auto:Keep size set to auto to ensure the output perfectly mirrors the framing and proportion of your main reference image.
  • Use Hex Codes for Material Accents:Specify exact hexadecimal codes (such as #C0C0C0 for silver accents) to ensure precise color fidelity on edited surfaces.
  • Describe Surface Tactility Carefully:Use descriptive physical modifiers like 'coarse pebble grain' or 'satin sheen finish' to guide the 32B flow matching engine.
  • Choose 2K for Fine Detail Edits:When retouching intricate patterns, fine watch dials, or macro textures, opt for 2K resolution for maximum clarity.
  • Enable Callbacks for Batch Jobs:For creative automation systems processing multiple images, configure callback_url to handle results asynchronously.

Notes

  • Input URL Constraints:The image_urls array must contain between 1 and 8 valid publicly accessible HTTP or HTTPS image URLs.
  • Supported Image Types:All input files must be standard JPEG, PNG, or WebP images accessible without firewall or authentication restrictions.
  • Automatic Refund Protection:If a task fails due to an unexpected system error, invalid format, or timeout, reserved credits are immediately refunded.
  • Asynchronous Processing Queue:All image editing jobs are processed asynchronously; retrieve completed assets via status polling or webhook notifications.

Related Models

FLUX.2 Flex Edit API FAQ

What is the FLUX.2 Flex Edit API?

FLUX.2 Flex Edit is an advanced image-to-image editing model developed by Black Forest Labs. It transforms one to eight reference images with natural language instructions into high-fidelity visuals up to 2K resolution, excelling in micro-surface textures, Hex color control, and native typography. Built on a 32B flow matching transformer coupled with a 24B Mistral-3 visual language model, it preserves subject identity and scene geometry while offering granular control over physical finishes. You can integrate it via the API or test edits directly in the interactive playground above.

How many reference images does FLUX.2 Flex Edit accept?

You can provide between 1 and 8 public HTTP or HTTPS image URLs in the image_urls array. The model analyzes all inputs in sequence to extract subject forms, lighting details, and micro-textures for complex multi-asset synthesis.

How does FLUX.2 Flex Edit preserve subject identity?

The underlying 24B Mistral-3 visual language model maps spatial contours and facial identity from reference images, allowing you to modify surrounding textures, lighting, and environments while preserving the core subject intact.

What does the auto size option do in FLUX.2 Flex Edit?

The auto preset automatically detects and adopts the aspect ratio of your primary reference image, ensuring the modified output matches the framing and dimensions of your original visual asset without distortion.

Can I use Hex color codes with FLUX.2 Flex Edit?

Yes. You can include standard hexadecimal color codes (like #4A90E2) directly within your editing instructions to recolor specific surfaces or background elements to exact corporate brand specifications.

What are the pricing rates for FLUX.2 Flex Edit?

Generations cost 18 credits ($0.090) for 1K standard resolution and 27 credits ($0.135) for 2K ultra-high resolution. If any generation request fails or times out, the deducted credits are automatically refunded in full.

When should I choose FLUX.2 Flex Edit over FLUX.2 Pro Edit?

Choose FLUX.2 Pro Edit for standard photorealistic editing and commercial e-commerce workflows at 6 credits per run. Opt for FLUX.2 Flex Edit when your project demands intricate micro-texture manipulation, specialized tactile finishes, and advanced artistic compositing at 18 credits per run.