# FLUX.2 [dev] > Black Forest Labs' open-weights image generation model with frontier performance, available for non-commercial local deployment ## Quick Reference - Model ID: flux.2-dev - Creator: Black Forest Labs - Status: active - Family: flux.2 - Base URL: https://api.lumenfall.ai/openai/v1 ## Specifications - Max Resolution: 2048x2048 - Max Input Images: 4 - Input Modalities: text, image - Output Modalities: image - Supported Modes: Text to Image, Image Edit ## API Parameters The compiled parameter schema for this model is available via the API: `GET /v1/models/flux.2-dev?schema=true`. ### Core Parameters - `prompt` (string) — REQUIRED: Text prompt for image generation. Modes: Text to Image ### Size & Layout - `size` (string): Image dimensions as WxH pixels (e.g. "1024x1024") or aspect ratio (e.g. "16:9"). Modes: Image Edit, Text to Image - `aspect_ratio` (string): Aspect ratio of the output image (e.g. "16:9", "1:1"). Modes: Image Edit, Text to Image - `resolution` (string): Output resolution tier (e.g. "1K", "4K"). Modes: Image Edit, Text to Image ### Media Inputs - `image` (file) — REQUIRED: Input image(s) to edit. Modes: Image Edit ### Output & Format - `response_format` (string): How to return the image. Default: url. Values: url, b64_json. Modes: Image Edit, Text to Image - `output_format` (string): Output image format. Values: png, jpeg, gif, webp, avif. Modes: Image Edit, Text to Image - `output_compression` (integer): Compression level for lossy formats (JPEG, WebP, AVIF). Modes: Image Edit, Text to Image - `n` (integer): Number of images to generate. Default: 1. Modes: Image Edit, Text to Image ## Model Identifiers - Primary Slug: flux.2-dev ## Tags image-generation, text-to-image, open-weights, non-commercial ## Available Providers ### fal.ai - Config Key: fal/flux.2-dev-edit - Provider Model ID: fal-ai/flux-2/edit - Pricing: $0.012/megapixel, $0.012/megapixel - Note: Resolution is rounded up to the next megapixel, separately for each reference image and the generated image - Note: 1 megapixel = 1024x1024 pixels - Note: Each reference image is counted separately (minimum 1 MP each) - Note: Images exceeding 4 megapixels are resized to 4 megapixels - Source: https://fal.ai/models/fal-ai/flux-2 ### fal.ai - Config Key: fal/flux.2-dev - Provider Model ID: fal-ai/flux-2 - Pricing: $0.012/megapixel - Source: https://fal.ai/models/fal-ai/flux-2 ### Replicate - Config Key: replicate/flux.2-dev - Provider Model ID: black-forest-labs/flux-2-dev - Pricing: $0.014/megapixel, $0.014/megapixel - Note: Resolution is rounded up to the next megapixel, separately for each reference image and the generated image - Note: 1 megapixel = 1024x1024 pixels - Source: https://replicate.com/black-forest-labs/flux-2-dev ## Performance Metrics Provider performance over the last 30 days. ### fal - Median Generation Time (p50): 7744ms - 95th Percentile Generation Time (p95): 12543ms - Average Generation Time: 8288ms - Success Rate: 100.0% - Total Requests: 14 - Time to First Byte (p50): 7242ms - Time to First Byte (p95): 11607ms ## Arena Benchmarks ### Candid Street Photography - Elo: 1174 - Record: 8W / 9L / 2T (19 battles) - Rank: #9 of 24 ### Fantasy Warrior - Elo: 1171 - Record: 11W / 14L / 1T (26 battles) - Rank: #14 of 21 ### Fantasy Warrior - Elo: 1158 - Record: 6W / 1L / 1T (8 battles) - Rank: #1 of 14 ### Geometric Composition - Elo: 1148 - Record: 9W / 9L / 3T (21 battles) - Rank: #21 of 22 ### Adorable Baby Animals in Sunny Meadow - Elo: 1117 - Record: 5W / 5L / 1T (11 battles) - Rank: #22 of 25 ### Heroic Super Hero Portrait - Elo: 1067 - Record: 1W / 5L / 0T (6 battles) - Rank: #20 of 21 ## Use Cases & Category Performance ### Portrait (Text-to-Image) - Rank: #12 of 21 - Elo: 1182 - Record: 11W / 14L / 1T (26 battles) - Win Rate: 42.3% ### Photorealism (Text-to-Image) - Rank: #14 of 23 - Elo: 1185 - Record: 8W / 9L / 2T (19 battles) - Win Rate: 42.1% ## Image Gallery 10 images available for this model. Browse all at https://lumenfall.ai/models/black-forest-labs/flux.2-dev/gallery ### Curated Examples - [A wide, cinematic shot of a sophisticated, high-end boutique storefront at dusk. The shop window ...](https://assets.lumenfall.ai/CD-FkTz9hPgjjyjWdeHVoZpJr-7HrQdby-kwEh47RKY/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/c7g2c2uj3pj7kw6znbzqnudt0fsy@jpeg) - [A hyper-realistic close-up of an elderly craftsman's weathered hands meticulously carving intrica...](https://assets.lumenfall.ai/mNLQh5LcNssUN1l0E2FFHE_i12gZsKvy6GtHgDWWuGE/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/v3gcxx5k171kttgr5q5p6o0y3c35@jpeg) - [A hyper-realistic close-up of a weathered craftsman's hands carving an intricate floral relief in...](https://assets.lumenfall.ai/puJ75aeWFvMswCWSZMHdD2lG_ROYtb66AXUz0iarAwg/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/pd0vtj2k4sf9femr8rx67mldgadx@jpeg) - [A cozy street-side flower shop with a chalkboard sign out front that reads "BLOOMS & BEYOND" in e...](https://assets.lumenfall.ai/fll9JXRYqNTyUNNeCL_umCaJTGXELrLBrtVtA-0QwoI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/mfljqntfu7qsxowzlx4eoo63aput@jpeg) ### Arena Competition Results - [Candid Street Photography](https://assets.lumenfall.ai/r6m2vQK1ZnBI0CfklApMrt-FNTOClGPpZvJ1g8diG7o/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/i1vtp80638yrblyowzjfugv56pnt@jpeg): #9 of 24 (Elo 1174) - [Fantasy Warrior](https://assets.lumenfall.ai/QhHY4uQJfnK9F8cuOs37BeAl8ZDdxzk9epAGwi7AEyY/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/mmvmzzmruwij86lys2wne4i356yx@jpeg): #14 of 21 (Elo 1171) - [Fantasy Warrior](https://assets.lumenfall.ai/0hUB_FYFZXSZ4olrPoe5vHbelvpPu8w22HymF4af0C0/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/i7i06eajh2ic9oxpokj0hvii99oi@jpeg): #1 of 14 (Elo 1158) - [Geometric Composition](https://assets.lumenfall.ai/-yw3_BH_62POMNpw9svmL-lQKQY5nmCX0ZgVOV5dzxs/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/nr8zqxmravkicz7fq2iatioei3us@jpeg): #21 of 22 (Elo 1148) - [Adorable Baby Animals in Sunny Meadow](https://assets.lumenfall.ai/N5Z0ToN4AKFCPVa0OLuMIWyzMF7GXY7-sl1LHtWR3EI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/2f82l9uhoxn2yrkiqixra2a33nzp@jpeg): #22 of 25 (Elo 1117) - [Heroic Super Hero Portrait](https://assets.lumenfall.ai/Fxy4eDwiwp0lYPJcoCFNsK2uODX8HA2lwulXpeUgadI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/ot9i46quvfso3mc3z91933qksam2@jpeg): #20 of 21 (Elo 1067) ## Example Prompt The following prompt was used to generate an example image in our playground: A cozy street-side flower shop with a chalkboard sign out front that reads "BLOOMS & BEYOND" in elegant cursive. Vibrant tulips and sunflowers fill the frame. In the soft-focus background, a capybara sits patiently by the shop door. ## Code Examples ### Text to Image (/v1/images/generations) #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/generations \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "flux.2-dev", "prompt": "", "size": "1024x1024" }' # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.generate({ model: 'flux.2-dev', prompt: '', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.generate( model="flux.2-dev", prompt="", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ### Image Edit (/v1/images/edits) #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/edits \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -F "model=flux.2-dev" \ -F "image=@source.png" \ -F "prompt=Add a starry night sky to this image" \ -F "size=1024x1024" # Response: # { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] } #### JavaScript import OpenAI from 'openai'; import fs from 'fs'; const client = new OpenAI({ apiKey: 'YOUR_API_KEY', baseURL: 'https://api.lumenfall.ai/openai/v1' }); const response = await client.images.edit({ model: 'flux.2-dev', image: fs.createReadStream('source.png'), prompt: 'Add a starry night sky to this image', size: '1024x1024' }); // { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } console.log(response.data[0].url); #### Python from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.lumenfall.ai/openai/v1" ) response = client.images.edit( model="flux.2-dev", image=open("source.png", "rb"), prompt="Add a starry night sky to this image", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ## About ## Overview FLUX.2 [dev] is an open-weights image generation model developed by Black Forest Labs, designed to offer frontier-level performance for non-commercial applications. It serves as an intermediate iteration between high-speed distilled models and large-scale professional versions, balancing computational efficiency with high visual fidelity. The model is specifically engineered to handle complex text-to-image prompts through a refined Rectified Flow architecture. ## Strengths * **High Text Rendering Accuracy:** The model demonstrates significant improvements in rendering legible, correctly spelled text within generated images, even in complex layouts or unconventional fonts. * **Instruction Adherence:** It excels at following multi-part prompts that specify spatial relationships, color palettes, and specific lighting conditions without losing detail in the background. * **Anatomical Realism:** Compared to previous iterations in the FLUX family, this version shows increased stability in generating human anatomy, particularly regarding hands, limb articulation, and skin textures. * **Compositional Diversity:** The model is less prone to "canonical" centering, allowing for more dynamic framing and varied perspectives based on descriptive text. ## Limitations * **Non-Commercial Licensing:** Unlike the "schnell" variants or standard open-source models, FLUX.2 [dev] is restricted to non-commercial use, which limits its application in production environments or for-profit products. * **Hardware Requirements:** While designed for local deployment, the model still requires significant VRAM to run at full precision, making it less accessible for entry-level consumer GPUs without quantization. * **Inference Latency:** It prioritizes output quality over generation speed, meaning it is noticeably slower than distilled 4-step models. ## Technical Background FLUX.2 [dev] is built on a Rectified Flow-based transformer architecture, which improves upon traditional diffusion methods by straightening the trajectory from noise to image. This approach allows for more efficient sampling and better alignment between the text encoder and the visual output. The training process leverages a massive-scale dataset designed to enhance the model's understanding of complex semantics and nuanced visual concepts. ## Best For This model is best suited for visual researchers, creative hobbyists, and developers prototyping new image generation workflows who require high-quality visual outputs without the constraints of a closed API. It is particularly useful for projects requiring precise typography or complex scene composition. FLUX.2 [dev] is available for experimentation and integration through Lumenfall's unified API and interactive playground, allowing you to compare its performance against other models in its class. ## Frequently Asked Questions ### How much does FLUX.2 [dev] cost? FLUX.2 [dev] starts at $0.012 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing. ### How do I use FLUX.2 [dev] via API? You can use FLUX.2 [dev] through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "flux.2-dev". Code examples are available in Python, JavaScript, and cURL. ### Which providers offer FLUX.2 [dev]? FLUX.2 [dev] is available through fal.ai and Replicate on Lumenfall. Lumenfall automatically routes requests to the best available provider. ### What is the maximum resolution for FLUX.2 [dev]? FLUX.2 [dev] supports images up to 2048x2048 resolution. ## Links - Model Page: https://lumenfall.ai/models/black-forest-labs/flux.2-dev - About: https://lumenfall.ai/models/black-forest-labs/flux.2-dev/about - Providers, Pricing & Performance: https://lumenfall.ai/models/black-forest-labs/flux.2-dev/providers - API Reference: https://lumenfall.ai/models/black-forest-labs/flux.2-dev/api - Benchmarks: https://lumenfall.ai/models/black-forest-labs/flux.2-dev/benchmarks - Use Cases: https://lumenfall.ai/models/black-forest-labs/flux.2-dev/use-cases - Gallery: https://lumenfall.ai/models/black-forest-labs/flux.2-dev/gallery - Playground: https://lumenfall.ai/playground?model=flux.2-dev - API Documentation: https://docs.lumenfall.ai