# 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 ## Model Identifiers - Primary Slug: flux.2-klein-9b - Aliases: flux-2-klein-9b ## Tags image-generation, text-to-image, image-editing, open-weights ## Available Providers ### 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 ### 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 ## Performance Metrics Provider performance over the last 30 days. ### fal - Median Generation Time (p50): 2701ms - 95th Percentile Generation Time (p95): 29003ms - Average Generation Time: 8417ms - Success Rate: 100.0% - Total Requests: 16 - Time to First Byte (p50): 2197ms - Time to First Byte (p95): 27882ms ## Arena Benchmarks ### Pose & Character Mashup - Elo: 1134 - Record: 2W / 3L / 0T (5 battles) - Rank: #2 of 14 ### Magic Burger Explosion: Fiery Photorealism Challenge - Elo: 1098 - Record: 3W / 4L / 2T (9 battles) - Rank: #9 of 18 ## Use Cases & Category Performance ### Photorealism (Text-to-Image) - Rank: #12 of 32 - Elo: 1206 - Record: 3W / 7L / 2T (12 battles) - Win Rate: 25.0% ### Text Rendering (Text-to-Image) - Rank: #20 of 30 - Elo: 1194 - Record: 3W / 7L / 2T (12 battles) - Win Rate: 25.0% ### Product, Branding & Commercial (Text-to-Image) - Rank: #21 of 26 - Elo: 1135 - Record: 3W / 4L / 2T (9 battles) - Win Rate: 33.3% ## Image Gallery 6 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 - [Pose & Character Mashup](https://assets.lumenfall.ai/_8_giA4GhBmOd0y4BDYWBdnBu3AHJ236Vf-ojNN0bUo/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/j8xxq29wu8fp4zjg6b52q76pvayt@jpeg): #2 of 14 (Elo 1134) - [Magic Burger Explosion: Fiery Photorealism Challenge](https://assets.lumenfall.ai/CrmLH_fhypNL3dvWP8JBXRZwLsgXPf5kmk9iGQLbsPk/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/9s6if1h1wvyr81f8r7wz49oekrcw@jpeg): #9 of 18 (Elo 1098) ## 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/playground?model=flux.2-klein-9b - API Documentation: https://docs.lumenfall.ai