# FLUX.2 [klein] 9B > Black Forest Labs' distilled 9 billion parameter image generation model with sub-second inference and multi-reference support ## Quick Reference - Model ID: flux.2-klein-9b - 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-klein-9b?schema=true`. ### Core Parameters - `prompt` (string) — REQUIRED: Edit instruction for the image. Modes: Image Edit, Text to Image - `seed` (integer): Random seed for reproducibility. Modes: Image Edit, Text to Image ### Size & Layout - `size` (string): Image dimensions as WxH pixels (e.g. "1024x1024") or aspect ratio (e.g. "16:9"). Values: auto, 1563x670, 670x1564, 1365x768, 768x1365, 1254x836, 836x1254, 887x1182, 1024x1024, 1145x916, 916x1145, 1183x887. Modes: Image Edit, Text to Image - `aspect_ratio` (string): Aspect ratio of the output image (e.g. "16:9", "1:1"). Values: auto, 9:21, 9:16, 2:3, 3:4, 4:5, 1:1, 5:4, 4:3, 3:2, 16:9, 21:9. Modes: Image Edit, Text to Image - `resolution` (string): Output resolution tier (e.g. "1K", "4K"). Values: auto, 1K. 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 ### Additional Parameters - `disable_safety_checker` (boolean): Disable safety checker for generated images.. Modes: Text to Image, Image Edit. Only available via replicate - `enable_safety_checker` (boolean): If set to true, the safety checker will be enabled.. Modes: Image Edit, Text to Image. Only available via fal - `go_fast` (boolean): Run faster predictions with additional optimizations.. Modes: Text to Image, Image Edit. Only available via replicate - `megapixels` (string): Resolution in megapixels. Values: 0.25, 0.5, 1, 2, 4. Modes: Text to Image, Image Edit. Only available via replicate - `num_inference_steps` (integer): The number of inference steps to perform.. Modes: Image Edit, Text to Image. Only available via fal - `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 - `sync_mode` (boolean): If `True`, the media will be returned as a data URI. Output is not stored when this is True.. Modes: Image Edit, Text to Image. Only available via fal ## Model Identifiers - Primary Slug: flux.2-klein-9b - Aliases: flux-2-klein-9b ## Dates - Released: January 2026 ## Tags image-generation, text-to-image, image-editing, open-weights ## Available Providers ### fal.ai - Config Key: fal/flux.2-klein-9b-edit - Provider Model ID: fal-ai/flux-2/klein/9b/edit - Pricing: $0.011/megapixel, $0.011/megapixel - Source: https://fal.ai/models/fal-ai/flux-2/klein/9b/edit ### Replicate - Config Key: replicate/flux.2-klein-9b - Provider Model ID: black-forest-labs/flux-2-klein-9b - Pricing: $0.0020/megapixel, $0.015/megapixel - Source: https://replicate.com/black-forest-labs/flux-2-klein-9b ### fal.ai - Config Key: fal/flux.2-klein-9b - Provider Model ID: fal-ai/flux-2/klein/9b - Pricing: $0.0060/megapixel - Source: https://fal.ai/models/fal-ai/flux-2/klein/9b ## Performance Metrics Provider performance over the last 30 days. ### fal - Median Generation Time (p50): 3389ms - 95th Percentile Generation Time (p95): 6788ms - Average Generation Time: 3939ms - Success Rate: 100.0% - Total Requests: 10 - Time to First Byte (p50): 1999ms - Time to First Byte (p95): 6497ms ## Arena Benchmarks ### Geometric Composition - Elo: 1270 - Record: 11W / 4L / 1T (16 battles) - Rank: #4 of 70 ### Magic Burger Explosion: Fiery Photorealism Challenge - Elo: 1226 - Record: 16W / 15L / 2T (33 battles) - Rank: #6 of 69 ### The Halloween Invitation - Elo: 1214 - Record: 10W / 1L / 0T (11 battles) - Rank: #5 of 70 ### Candid Street Photography - Elo: 1211 - Record: 8W / 4L / 0T (12 battles) - Rank: #15 of 68 ### Pose & Character Mashup - Elo: 1200 - Record: 10W / 3L / 0T (13 battles) - Rank: #3 of 33 ### The Capybara Taxi Driver - Elo: 1193 - Record: 7W / 6L / 0T (13 battles) - Rank: #11 of 69 ### Chalkboard Menu - Elo: 1192 - Record: 14W / 14L / 0T (28 battles) - Rank: #10 of 69 ### Apollo 11: Journey to Tranquility - Elo: 1185 - Record: 5W / 4L / 0T (9 battles) - Rank: #20 of 70 ### Adorable Baby Animals in Sunny Meadow - Elo: 1182 - Record: 7W / 9L / 0T (16 battles) - Rank: #28 of 72 ### The Reversed Rodeo - Elo: 1179 - Record: 4W / 4L / 0T (8 battles) - Rank: #8 of 68 ### Man and Car in California - Elo: 1174 - Record: 4W / 0L / 0T (4 battles) - Rank: #14 of 35 ### Outfit Transfer Challenge - Elo: 1145 - Record: 3W / 5L / 1T (9 battles) - Rank: #10 of 33 ### Vintage Cafe Logo - Elo: 1128 - Record: 3W / 9L / 0T (12 battles) - Rank: #40 of 70 ### Isometric Miniature Diorama Scenes - Elo: 1106 - Record: 4W / 12L / 0T (16 battles) - Rank: #50 of 72 ### Fantasy Warrior - Elo: 1106 - Record: 4W / 5L / 1T (10 battles) - Rank: #46 of 71 ### Modern Clean Menu - Elo: 1070 - Record: 1W / 5L / 0T (6 battles) - Rank: #54 of 69 ## Use Cases & Category Performance ### Lighting, Shadows & Materials (Image Editing) - Rank: #5 of 36 - Elo: 1250 - Record: 18W / 9L / 1T (28 battles) - Win Rate: 64.3% ### Art (Text-to-Image) - Rank: #8 of 57 - Elo: 1232 - Record: 14W / 5L / 0T (19 battles) - Win Rate: 73.7% ### Preservation (Image Editing) - Rank: #7 of 37 - Elo: 1221 - Record: 18W / 10L / 1T (29 battles) - Win Rate: 62.1% ### Prompt Adherence (Image Editing) - Rank: #7 of 29 - Elo: 1217 - Record: 13W / 9L / 1T (23 battles) - Win Rate: 56.5% ### People & Poses (Image Editing) - Rank: #7 of 27 - Elo: 1225 - Record: 11W / 3L / 0T (14 battles) - Win Rate: 78.6% ### Product, Branding & Commercial (Text-to-Image) - Rank: #17 of 61 - Elo: 1230 - Record: 49W / 48L / 2T (99 battles) - Win Rate: 49.5% ### Aesthetics (Image Editing) - Rank: #11 of 33 - Elo: 1215 - Record: 5W / 0L / 0T (5 battles) - Win Rate: 100.0% ### Adding & Editing Objects (Image Editing) - Rank: #10 of 29 - Elo: 1210 - Record: 7W / 5L / 1T (13 battles) - Win Rate: 53.8% ### Photorealism (Image Editing) - Rank: #14 of 36 - Elo: 1214 - Record: 8W / 6L / 1T (15 battles) - Win Rate: 53.3% ### Photorealism (Text-to-Image) - Rank: #25 of 62 - Elo: 1203 - Record: 71W / 61L / 4T (136 battles) - Win Rate: 52.2% ### Text Rendering (Text-to-Image) - Rank: #26 of 61 - Elo: 1218 - Record: 53W / 60L / 2T (115 battles) - Win Rate: 46.1% ### Portraits (Text-to-Image) - Rank: #23 of 50 - Elo: 1171 - Record: 4W / 5L / 1T (10 battles) - Win Rate: 40.0% ### Cartoon, Anime & Fantasy (Text-to-Image) - Rank: #23 of 50 - Elo: 1171 - Record: 4W / 5L / 1T (10 battles) - Win Rate: 40.0% ### 3D Imaging & Modeling (Text-to-Image) - Rank: #30 of 61 - Elo: 1204 - Record: 15W / 16L / 1T (32 battles) - Win Rate: 46.9% ### Prompt Adherence (Text-to-Image) - Rank: #32 of 62 - Elo: 1226 - Record: 69W / 73L / 3T (145 battles) - Win Rate: 47.6% ### Backgrounds & Scenes (Image Editing) - Rank: #15 of 26 - Elo: 1206 - Record: 4W / 0L / 0T (4 battles) - Win Rate: 100.0% ### Creativity (Text-to-Image) - Rank: #39 of 62 - Elo: 1205 - Record: 30W / 35L / 1T (66 battles) - Win Rate: 45.5% ### Aesthetics (Text-to-Image) - Rank: #41 of 62 - Elo: 1213 - Record: 75W / 74L / 4T (153 battles) - Win Rate: 49.0% ## Image Gallery 20 images available for this model. Browse all at https://lumenfall.ai/models/black-forest-labs/flux.2-klein-9b/gallery ### Curated Examples - [Cinematic wide shot of a sophisticated, high-end boutique storefront at dusk. The shop window is ...](https://assets.lumenfall.ai/21DXmWV9AX_Gf751UclKPTkkH_nCCINAi6JWjcUhmq4/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/n4y1vvhfakobbard923hz6liyh77@jpeg) - [A high-end cinematic close-up of a vintage 1950s camera lens reflecting a sun-drenched Italian co...](https://assets.lumenfall.ai/PkiWHEdS26cHPcm_9yBpaSXH5RgnEENPopBomEl3mGI/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/z89mwfn35gzu0t4suxdnrn2korop@jpeg) - [A hyper-realistic close-up of a weathered, vintage leather traveler's journal resting on a rustic...](https://assets.lumenfall.ai/qRBEPxku-A9MCAVoUgfrTW5esYaEyswBF4OcgTtQRks/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/9otlhkaizlrav8xejgv4qnn4kicw@jpeg) - [A vintage wooden storefront for a bookstore called "THE TURNING PAGE" in crisp, elegant gold lett...](https://assets.lumenfall.ai/4NzFv1G_l8dxmIcKx501bL3VghvNWgwpX76A55jFdYY/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/pss6bd98sdf711lsyi5vu0d5ilfz@jpeg) ### Arena Competition Results - [Geometric Composition](https://assets.lumenfall.ai/qmijruXwWEruLIGSvy83yyIGkKnmZIo0_1InbfVQzZM/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/3nj7ldvbg3hgjq3vid3mu5s37rgn@jpeg): #4 of 70 (Elo 1270) - [Magic Burger Explosion: Fiery Photorealism Challenge](https://assets.lumenfall.ai/CrmLH_fhypNL3dvWP8JBXRZwLsgXPf5kmk9iGQLbsPk/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/9s6if1h1wvyr81f8r7wz49oekrcw@jpeg): #6 of 69 (Elo 1226) - [The Halloween Invitation](https://assets.lumenfall.ai/5ZUI2eCuEoxH8EAM4hYfH4AaN7U0AXuuvgE-DMKZBtQ/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/ar841ivv4hxqqilrf60jtac8k256@jpeg): #5 of 70 (Elo 1214) - [Candid Street Photography](https://assets.lumenfall.ai/fsMx3gSnhYWupJn4F0zmUrdLjjjbAe-V0U0iOrvmmfQ/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/zm4k8jbaa0uj7pybjzwgcmwlw4tf@jpeg): #15 of 68 (Elo 1211) - [Pose & Character Mashup](https://assets.lumenfall.ai/_8_giA4GhBmOd0y4BDYWBdnBu3AHJ236Vf-ojNN0bUo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/j8xxq29wu8fp4zjg6b52q76pvayt@jpeg): #3 of 33 (Elo 1200) - [The Capybara Taxi Driver](https://assets.lumenfall.ai/UhV5W-6LXgJoczWqoAXeGZSJmhUq9Ox2dtx9IOnwtA0/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/d2c6nf0stvn2gte4wsa49g8o7imd@jpeg): #11 of 69 (Elo 1193) - [Chalkboard Menu](https://assets.lumenfall.ai/C-2C3FBqdJDprlvZb3UQyKPc7YOpns_CjKylT6klOl0/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/4pmfq033f7hhbd08upwqi18vwvs0@jpeg): #10 of 69 (Elo 1192) - [Apollo 11: Journey to Tranquility](https://assets.lumenfall.ai/Ds_XCz5cWYaSyGKkUjQTMSw4kvF7_vU79chKzjaiU3U/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/5e1a912p3ru4xebihogr6z7k42ci@jpeg): #20 of 70 (Elo 1185) - [Adorable Baby Animals in Sunny Meadow](https://assets.lumenfall.ai/2s1jwOOlYRjPQl6dgYCpWNzCbLNdW5NHWvdxEwfEivo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/fgd6j244ts36tvr7i2jh0kf4bqbz@jpeg): #28 of 72 (Elo 1182) - [The Reversed Rodeo](https://assets.lumenfall.ai/QJsncZYC_wRHRAjZCNY0Lhe0yjH4k8KOn1Ggiq4eU_k/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/yvl5li00ep4y6nrq5q7csnefpg5c@jpeg): #8 of 68 (Elo 1179) - [Man and Car in California](https://assets.lumenfall.ai/vaK-L1l9mal8HBn64sbWBb5ycy4P1R5AYWbvZEAy4jo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/jehfz26p04riq6qf5gcobpu32ons@jpeg): #14 of 35 (Elo 1174) - [Outfit Transfer Challenge](https://assets.lumenfall.ai/BSvBEdqQ-305cNj3akrzidGjLUigLcm1jNtToh1rJ0A/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/69k8fulmmld865idj2lepyo2s2ae@jpeg): #10 of 33 (Elo 1145) - [Vintage Cafe Logo](https://assets.lumenfall.ai/hJLBWFZweKwlFpYxAWjXK6iKaDXrzLD338R-UtOEB28/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/ktb6t2jl9gubcmph4cbpphslg4em@jpeg): #40 of 70 (Elo 1128) - [Isometric Miniature Diorama Scenes](https://assets.lumenfall.ai/J0tisnTAaYsrfT7-QVYRMU60FF4cXDOhlMZ4RyaVKnc/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/m9fp5slvjx9ywlcys87pt0dhx3po@jpeg): #50 of 72 (Elo 1106) - [Fantasy Warrior](https://assets.lumenfall.ai/vV7bMML0K6UPAonjll0ho8PoJPqoWtOHuV4K0OzK30g/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/ncso9alzk19xyb0mbo25gsf7afwc@jpeg): #47 of 71 (Elo 1106) - [Modern Clean Menu](https://assets.lumenfall.ai/Eum2KRAO8t_ahDPp3qUmbCFE1wZJ-Gy4kphXZ_vkot4/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/plscedhiea7vmycg6dzyetfolzfb@jpeg): #54 of 69 (Elo 1070) ## Example Prompt The following prompt was used to generate an example image in our playground: A vintage wooden storefront for a bookstore called "THE TURNING PAGE" in crisp, elegant gold lettering on the window. A cozy interior is visible with floor-to-ceiling shelves. On the sidewalk bench, a capybara sits quietly reading a newspaper. ## 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-klein-9b", "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-klein-9b', 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-klein-9b", 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-klein-9b" \ -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-klein-9b', 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-klein-9b", 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) ## Frequently Asked Questions ### How much does FLUX.2 [klein] 9B cost? FLUX.2 [klein] 9B starts at $0.006 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing. ### How do I use FLUX.2 [klein] 9B via API? You can use FLUX.2 [klein] 9B through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "flux.2-klein-9b". Code examples are available in Python, JavaScript, and cURL. ### Which providers offer FLUX.2 [klein] 9B? FLUX.2 [klein] 9B 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 [klein] 9B? FLUX.2 [klein] 9B supports images up to 2048x2048 resolution. ## Links - Model Page: https://lumenfall.ai/models/black-forest-labs/flux.2-klein-9b - About: https://lumenfall.ai/models/black-forest-labs/flux.2-klein-9b/about - Providers, Pricing & Performance: https://lumenfall.ai/models/black-forest-labs/flux.2-klein-9b/providers - API Reference: https://lumenfall.ai/models/black-forest-labs/flux.2-klein-9b/api - Benchmarks: https://lumenfall.ai/models/black-forest-labs/flux.2-klein-9b/benchmarks - Use Cases: https://lumenfall.ai/models/black-forest-labs/flux.2-klein-9b/use-cases - Gallery: https://lumenfall.ai/models/black-forest-labs/flux.2-klein-9b/gallery - Playground: https://lumenfall.ai/models/black-forest-labs/flux.2-klein-9b/playground - API Documentation: https://docs.lumenfall.ai