# 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: 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, 1563x670, 670x1564, 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:21, 9:16, 2:3, 3:4, 4:5, 1:1, 5:4, 4:3, 3:2, 16:9, 21: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 - `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: Text to Image, Image Edit. 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: Text to Image, Image Edit. 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: Text to Image, Image Edit. 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 ### 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 ### 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 ## Arena Benchmarks ### Pose & Character Mashup - Elo: 1159 - Record: 6W / 3L / 0T (9 battles) - Rank: #3 of 14 ### Magic Burger Explosion: Fiery Photorealism Challenge - Elo: 1142 - Record: 5W / 5L / 2T (12 battles) - Rank: #5 of 19 ### Outfit Transfer Challenge - Elo: 1059 - Record: 1W / 4L / 1T (6 battles) - Rank: #11 of 16 ### Chalkboard Menu - Elo: 1055 - Record: 2W / 6L / 0T (8 battles) - Rank: #17 of 25 ## Use Cases & Category Performance ### Photorealism (Text-to-Image) - Rank: #15 of 38 - Elo: 1204 - Record: 7W / 10L / 2T (19 battles) - Win Rate: 36.8% ### Text Rendering (Text-to-Image) - Rank: #23 of 37 - Elo: 1191 - Record: 7W / 10L / 2T (19 battles) - Win Rate: 36.8% ### Product, Branding & Commercial (Text-to-Image) - Rank: #22 of 29 - Elo: 1156 - Record: 5W / 5L / 2T (12 battles) - Win Rate: 41.7% ### Photorealism (Image Editing) - Rank: #17 of 17 - Elo: 1104 - Record: 1W / 3L / 1T (5 battles) - Win Rate: 20.0% ## Image Gallery 8 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): #3 of 14 (Elo 1159) - [Magic Burger Explosion: Fiery Photorealism Challenge](https://assets.lumenfall.ai/vq2I7ygDfgqNPT6BAflzcA6xEJAnZAxDheQL08mvC3s/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/9iyyim6zz3h95bhky1h4tbl2gvsx@jpeg): #5 of 19 (Elo 1142) - [Outfit Transfer Challenge](https://assets.lumenfall.ai/BSvBEdqQ-305cNj3akrzidGjLUigLcm1jNtToh1rJ0A/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/69k8fulmmld865idj2lepyo2s2ae@jpeg): #11 of 16 (Elo 1059) - [Chalkboard Menu](https://assets.lumenfall.ai/nudQ6ngFs1bWkidkkTlibGgW41DzGv8qZg3t3_LVHXA/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/d52nexxp3chu888g7uxrwx4v9tn6@jpeg): #17 of 25 (Elo 1055) ## 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 Replicate and fal.ai 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