# FLUX.2 [max] > Black Forest Labs' flagship image generation model delivering state-of-the-art quality with exceptional realism, precision, and consistency for both text-to-image and advanced image editing ## Quick Reference - Model ID: flux.2-max - Creator: Black Forest Labs - Status: active - Family: flux.2 - Base URL: https://api.lumenfall.ai/openai/v1 ## Specifications - Max Resolution: 2048x2048 - Max Input Images: 10 - 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-max?schema=true`. ### Core Parameters - `prompt` (string) — REQUIRED: Text prompt for image generation. Modes: Text to Image, Image Edit - `seed` (integer): Random seed for reproducibility. Modes: Text to Image, Image Edit ### Size & Layout - `size` (string): Image dimensions as WxH pixels (e.g. "1024x1024") or aspect ratio (e.g. "16:9"). Values: auto, 1365x768, 768x1365, 1254x836, 836x1254, 887x1182, 1024x1024, 1145x916, 916x1145, 1183x887. Modes: Text to Image, Image Edit - `aspect_ratio` (string): Aspect ratio of the output image (e.g. "16:9", "1:1"). Values: auto, 9:16, 2:3, 3:4, 4:5, 1:1, 5:4, 4:3, 3:2, 16:9. Modes: Text to Image, Image Edit - `resolution` (string): Output resolution tier (e.g. "1K", "4K"). Values: auto, 1K. Modes: Text to Image, Image Edit ### 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: Text to Image, Image Edit - `output_format` (string): Output image format. Values: png, jpeg, gif, webp, avif. Modes: Text to Image, Image Edit - `output_compression` (integer): Compression level for lossy formats (JPEG, WebP, AVIF). Modes: Text to Image, Image Edit - `n` (integer): Number of images to generate. Default: 1. Modes: Text to Image, Image Edit ### Additional Parameters - `enable_safety_checker` (boolean): Whether to enable the safety checker.. Modes: Text to Image, Image Edit. Only available via fal - `height` (integer): Height of the generated image. Only used when aspect_ratio=custom. Must be a multiple of 16 (if it's not, it will be rounded to nearest multiple of 16).. Modes: Text to Image, Image Edit. Only available via replicate - `output_quality` (integer): Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs. Modes: Text to Image, Image Edit. Only available via replicate - `safety_tolerance` (string): The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive.. Values: 1, 2, 3, 4, 5. Modes: Text to Image, Image Edit - `sync_mode` (boolean): If `True`, the media will be returned as a data URI and the output data won't be available in the request history.. Modes: Text to Image, Image Edit. Only available via fal - `width` (integer): Width of the generated image. Only used when aspect_ratio=custom. Must be a multiple of 16 (if it's not, it will be rounded to nearest multiple of 16).. Modes: Text to Image, Image Edit. Only available via replicate ## Model Identifiers - Primary Slug: flux.2-max - Aliases: flux-2-max ## Tags image-generation, text-to-image, image-editing, photorealistic, high-quality ## Available Providers ### fal.ai - Config Key: fal/flux.2-max - Provider Model ID: fal-ai/flux-2-max - Pricing: - Source: https://fal.ai/models/fal-ai/flux-2-max ### fal.ai - Config Key: fal/flux.2-max-edit - Provider Model ID: fal-ai/flux-2-max/edit - Pricing: $0.030/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-max ### Replicate - Config Key: replicate/flux.2-max - Provider Model ID: black-forest-labs/flux-2-max - Pricing: $0.040/request, $0.030/megapixel, $0.030/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://replicate.com/black-forest-labs/flux-2-max ## Performance Metrics Provider performance over the last 30 days. ### replicate - Median Generation Time (p50): 35614ms - 95th Percentile Generation Time (p95): 68924ms - Average Generation Time: 37775ms - Success Rate: 93.0% - Total Requests: 71 - Time to First Byte (p50): 35796ms - Time to First Byte (p95): 68349ms ### fal - Median Generation Time (p50): 36952ms - 95th Percentile Generation Time (p95): 86585ms - Average Generation Time: 40632ms - Success Rate: 80.4% - Total Requests: 102 - Time to First Byte (p50): 37025ms - Time to First Byte (p95): 86653ms ## Arena Benchmarks ### Isometric Miniature Diorama Scenes - Elo: 1266 - Record: 11W / 6L / 3T (20 battles) - Rank: #2 of 21 ### Studio Ghibli Anime Style - Elo: 1256 - Record: 17W / 13L / 1T (31 battles) - Rank: #2 of 14 ### Intricate Floral Mandala - Elo: 1248 - Record: 16W / 6L / 4T (26 battles) - Rank: #4 of 15 ### Man and Car in California - Elo: 1239 - Record: 26W / 61L / 2T (89 battles) - Rank: #9 of 13 ### Victorian Greenhouse Oasis - Elo: 1219 - Record: 10W / 8L / 1T (19 battles) - Rank: #5 of 17 ### Adorable Baby Animals in Sunny Meadow - Elo: 1212 - Record: 11W / 2L / 1T (14 battles) - Rank: #5 of 25 ### Night Sky Transformation - Elo: 1209 - Record: 12W / 7L / 4T (23 battles) - Rank: #7 of 16 ### Apollo 11: Journey to Tranquility - Elo: 1207 - Record: 13W / 7L / 2T (22 battles) - Rank: #6 of 19 ### Bald man challenge - Elo: 1200 - Record: 16W / 8L / 5T (29 battles) - Rank: #10 of 15 ### Modern Clean Menu - Elo: 1194 - Record: 9W / 9L / 0T (18 battles) - Rank: #9 of 19 ### Candid Street Photography - Elo: 1188 - Record: 18W / 8L / 0T (26 battles) - Rank: #8 of 24 ### Golden Hour Stroll - Elo: 1186 - Record: 15W / 19L / 1T (35 battles) - Rank: #7 of 13 ### Neutral Expression to Genuine Smile - Elo: 1185 - Record: 10W / 27L / 4T (41 battles) - Rank: #11 of 14 ### Heroic Super Hero Portrait - Elo: 1182 - Record: 16W / 11L / 3T (30 battles) - Rank: #12 of 21 ### Geometric Composition - Elo: 1180 - Record: 8W / 12L / 3T (23 battles) - Rank: #14 of 22 ### Over-the-top cartoon caricature - Elo: 1175 - Record: 15W / 19L / 5T (39 battles) - Rank: #10 of 13 ### Vintage Cafe Logo - Elo: 1141 - Record: 7W / 8L / 2T (17 battles) - Rank: #19 of 21 ### Selective Object Swap - Elo: 1000 - Record: 1W / 1L / 2T (4 battles) - Rank: #6 of 12 ## Use Cases & Category Performance ### Photorealism (Text-to-Image) - Rank: #4 of 23 - Elo: 1231 - Record: 18W / 8L / 0T (26 battles) - Win Rate: 69.2% ### Anime (Image Editing) - Rank: #4 of 14 - Elo: 1221 - Record: 16W / 12L / 1T (29 battles) - Win Rate: 55.2% ### Text Rendering (Text-to-Image) - Rank: #6 of 23 - Elo: 1242 - Record: 28W / 22L / 4T (54 battles) - Win Rate: 51.9% ### Portrait (Image Editing) - Rank: #6 of 15 - Elo: 1246 - Record: 25W / 34L / 9T (68 battles) - Win Rate: 36.8% ### Photorealism (Image Editing) - Rank: #11 of 16 - Elo: 1215 - Record: 77W / 119L / 16T (212 battles) - Win Rate: 36.3% ### Product, Branding & Commercial (Text-to-Image) - Rank: #17 of 21 - Elo: 1151 - Record: 6W / 7L / 2T (15 battles) - Win Rate: 40.0% ## Image Gallery 23 images available for this model. Browse all at https://lumenfall.ai/models/black-forest-labs/flux.2-max/gallery ### Curated Examples - [A hyper-realistic, wide-angle cinematic shot of a master stone-mason in a sun-drenched, dusty Ita...](https://assets.lumenfall.ai/VOFqBP3jAsYBCy4Y-H9gUMtZ3xa1vbXPrYBxL_bz4Ck/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/es5980agcmrjmpn67ex6r3l3xt7r@jpeg) - [A wide, cinematic shot of a sophisticated high-end camera lens repair shop at dusk. In the center...](https://assets.lumenfall.ai/GeeAy414DaEIm91Bmht3yr-PtgW0g87GaaReyjY2fhU/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/c0nf0klf06xjz9a8dqb0tmhfqo2y@jpeg) - [A hyper-realistic close-up of a weathered leather traveler’s journal laying open on a rustic wood...](https://assets.lumenfall.ai/hfR1lTyEGNafbDR7exvGKud49KV-hAxTxj3abS6Oi2M/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/zg9ux9i0h5dya1wmidq0n4pzeffd@jpeg) - [A hyper-realistic, high-angle shot of a minimalist wooden workbench. In the center sits a premium...](https://assets.lumenfall.ai/uqYJiiApUFkXu1hLasOM-yY2zJjwx4aEO2iELa-Wh6U/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/711brgbd4pc7xxdu9zbrusvj4k3o@jpeg) - [A cozy street-side bakery window reflecting the morning sun, with the word "ARTISAN" hand-painted...](https://assets.lumenfall.ai/HsVrdKW7LJj5t-SKAbz6bPQCAsciNuEdp0zQvJ2MxfU/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/81bnjrwymd9ychkfh4tes4m7vc7a@jpeg) ### Arena Competition Results - [Isometric Miniature Diorama Scenes](https://assets.lumenfall.ai/7rnmejsobEexsoXAqSBF_grcq9hsZdW3Kg1Gz9FXIJg/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/x1ugo3fl8zlverzwq9hz79277bw7@jpeg): #2 of 21 (Elo 1266) - [Studio Ghibli Anime Style](https://assets.lumenfall.ai/1oyfkgof89DUKAioqSRXNlfM_yKts7A_c0VCUBrhxfo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/7egzquoa2v0if8761syguo6avxkg@jpeg): #2 of 14 (Elo 1256) - [Intricate Floral Mandala](https://assets.lumenfall.ai/dOIMke4_KAWqGzOHp2cHyEPaQ7yGy_ecNyc5F6H1wcE/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/hff5o47qjrfdwbnizr7e1cry65je@jpeg): #4 of 15 (Elo 1248) - [Man and Car in California](https://assets.lumenfall.ai/u-2ED3AX8Alrbiqwitb7hNx_vsGB4ovOOmWpAPuf-_M/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/fapywxxm5qfwoe0qxahiomd8zdm7@jpeg): #9 of 13 (Elo 1239) - [Victorian Greenhouse Oasis](https://assets.lumenfall.ai/k4PWag-ocHN0TYwk9XgI7cR6dKAoHpLikv_yJBUsAPo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/31hiajh0foxqb1kby8sjfbtf8rkm@jpeg): #5 of 17 (Elo 1219) - [Adorable Baby Animals in Sunny Meadow](https://assets.lumenfall.ai/8-ToM3cEXxMLtaVXQ0InqbNFhTjDljOSSLJIuu2Q8b4/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/7qismry0yh4exfj3dh7wz7xab1xu@jpeg): #5 of 25 (Elo 1212) - [Night Sky Transformation](https://assets.lumenfall.ai/FI_sG2_v8pLqYOnVtI6UWqQrZoqbaEzUAjAmJfFmYtc/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/lujegoo2qsui4vgmvgz2zg1bt9tr@jpeg): #7 of 16 (Elo 1209) - [Apollo 11: Journey to Tranquility](https://assets.lumenfall.ai/YBTRbS9t1oFTVVUaNdTlCBLVEIyB8Gh0XKas_c5NdRc/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/5cqt1yt1o5xcvicxvmnojn7oxw7e@jpeg): #6 of 19 (Elo 1207) - [Bald man challenge](https://assets.lumenfall.ai/vdGEMQGr6RWoKM50tdBuPnvs9jRXjTBt23M0HXIbWIQ/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/4x8koaojbe80av9fl0ogxy9o3izv@jpeg): #10 of 15 (Elo 1200) - [Modern Clean Menu](https://assets.lumenfall.ai/yBPvg8ucYsKRROLBw3U1f2yAgxk1nK4Dr4drzSdzxaI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/70tlonxmm0pe2zevhjy6nx3gwk4b@jpeg): #9 of 19 (Elo 1194) - [Candid Street Photography](https://assets.lumenfall.ai/i7fWB3lmVJff5IlvI-LVLEPdJF_Nlz1xEEJIFknSF40/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/brjbuxgu8bd0h8yi71lbarspujh3@jpeg): #8 of 24 (Elo 1188) - [Golden Hour Stroll](https://assets.lumenfall.ai/kU33xLaF3AyGtDyvE9BJ2ZZUMfJiScnkBRUq_3fhNrw/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/przor8n6ormesjrekw4lu8bqoewf@jpeg): #7 of 13 (Elo 1186) - [Neutral Expression to Genuine Smile](https://assets.lumenfall.ai/OBBBB2whuSs7ojFKGxHVycLdrD-M7cz_2DRo9bBnHqg/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/d32444l3dj7xs0k9slxfdu56vafl@jpeg): #11 of 14 (Elo 1185) - [Heroic Super Hero Portrait](https://assets.lumenfall.ai/PRFrB2gshRbEK8Il-wc6mBghNTaoX1RRYc40O2muUJk/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/4yh77k540h1ok42khftl78bvusdt@jpeg): #12 of 21 (Elo 1182) - [Geometric Composition](https://assets.lumenfall.ai/Le_yrzLjtNgOYZoVUicwTm31ds8EK5mixLTPqyvdFN0/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/0lhgje6bs88ib0eude2bszsbgodw@jpeg): #14 of 22 (Elo 1180) - [Over-the-top cartoon caricature](https://assets.lumenfall.ai/WPIeWEA6kc-hrC5-_x95--WJWvf7l3ArAnczlKYA_qE/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/n2durnj0bteqsb1efqdd2gmbq029@jpeg): #10 of 13 (Elo 1175) - [Vintage Cafe Logo](https://assets.lumenfall.ai/b8f2bGFDoethX5Ut3l1wGNL3Tk3y9rvpcyq1JmgBD3Y/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/rw68tmqnn7p75m4udlxvfom1jmku@jpeg): #19 of 21 (Elo 1141) - [Selective Object Swap](https://assets.lumenfall.ai/gJ55JjYHATBA33p5ccUYvyc8_5ZNVbd8neyICqEMRVU/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/5cmgfabqs2drvohr6z8yx06oyuhy@jpeg): #6 of 12 (Elo 1000) ## Example Prompt The following prompt was used to generate an example image in our playground: A cozy street-side bakery window reflecting the morning sun, with the word "ARTISAN" hand-painted in gold calligraphy on the glass. A customer waits by the door, while a capybara sits quietly on the sidewalk nearby, wearing a tiny red scarf. ## 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-max", "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-max', 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-max", 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-max" \ -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-max', 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-max", 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 [max] is the flagship image generation model from Black Forest Labs, designed to push the boundaries of photorealism and compositional accuracy. As the most a capable entry in the FLUX.2 family, it functions as a multimodal tool capable of both high-fidelity text-to-image synthesis and sophisticated image-to-image editing. It is distinguished by its ability to follow complex prompts with high spatial precision while maintaining structural consistency across various aspect ratios. ## Strengths * **Anatomical and Textual Precision:** The model excels at rendering fine anatomical details—such as hands, eyes, and skin textures—and exhibits high accuracy when placing legible, coherent text within generated images. * **Prompt Adherence:** It handles multi-subject prompts and complex spatial relationships (e.g., "a blue sphere balanced on a rough wooden cube behind a glass prism") with significantly fewer hallucinations than previous iterations. * **Photorealistic Texture:** The model produces outputs with improved dynamic range and lighting, effectively simulating professional photography across various lenses and lighting conditions. * **Versatile Modality:** It supports both text and image inputs, making it highly effective for refined image editing, style transfer, and consistent character variations. ## Limitations * **Computational Latency:** Due to its high parameter count and focus on maximum quality, inference times are generally higher than the "pro" or "schnell" variants of the same family. * **Hardware Requirements:** The model's complexity makes it less suitable for real-time applications or low-latency environments compared to distilled or smaller models. * **Knowledge Cutoffs:** Like all large-scale generative models, it may struggle with highly niche or very recent cultural events and specific technical diagrams that were not well-represented in its training data. ## Technical Background FLUX.2 [max] is built on a large-scale transformer-based architecture optimized for flow-based image generation. It utilizes a sophisticated latent diffusion process that integrates high-resolution visual tokens with rich text embeddings. Black Forest Labs employed advanced training techniques to improve the model's understanding of physics and light, resulting in a more predictable output during the denoising process. ## Best For This model is best suited for professional creative workflows, advertising imagery, and high-end concept art where visual fidelity is more critical than generation speed. It is an ideal choice for tasks requiring precise text rendering or consistent architectural details. FLUX.2 [max] is available for testing and integration through Lumenfall's unified API and playground, allowing developers to compare its output against other models in the FLUX family. ## Frequently Asked Questions ### How much does FLUX.2 [max] cost? FLUX.2 [max] starts at $0.03 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing. ### How do I use FLUX.2 [max] via API? You can use FLUX.2 [max] through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "flux.2-max". Code examples are available in Python, JavaScript, and cURL. ### Which providers offer FLUX.2 [max]? FLUX.2 [max] 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 [max]? FLUX.2 [max] supports images up to 2048x2048 resolution. ## Links - Model Page: https://lumenfall.ai/models/black-forest-labs/flux.2-max - About: https://lumenfall.ai/models/black-forest-labs/flux.2-max/about - Providers, Pricing & Performance: https://lumenfall.ai/models/black-forest-labs/flux.2-max/providers - API Reference: https://lumenfall.ai/models/black-forest-labs/flux.2-max/api - Benchmarks: https://lumenfall.ai/models/black-forest-labs/flux.2-max/benchmarks - Use Cases: https://lumenfall.ai/models/black-forest-labs/flux.2-max/use-cases - Gallery: https://lumenfall.ai/models/black-forest-labs/flux.2-max/gallery - Playground: https://lumenfall.ai/playground?model=flux.2-max - API Documentation: https://docs.lumenfall.ai