# FLUX.1 Kontext [dev] > Black Forest Labs' open-weights multimodal flow transformer for in-context image generation and editing, available for non-commercial use with character consistency and style transfer capabilities ## Quick Reference - Model ID: flux.1-kontext-dev - Creator: Black Forest Labs - Status: active - Family: flux.1-kontext - Base URL: https://api.lumenfall.ai/openai/v1 ## Specifications - Max Resolution: 2048x2048 - Max Input Images: 4 - Input Modalities: text, image - Output Modalities: image ## Model Identifiers - Primary Slug: flux.1-kontext-dev ## Dates ## Tags image-generation, text-to-image, image-editing, open-weights, non-commercial ## Available Providers ### Replicate - Config Key: replicate/flux.1-kontext-dev - Provider Model ID: black-forest-labs/flux-kontext-dev - Pricing: - source: official - currency: USD - components: [{"type" => "output", "metric" => "image", "unit_price" => 0.025}] - source_url: https://replicate.com/black-forest-labs/flux-kontext-dev - effective_at: 2025-12-30 ### fal.ai - Config Key: fal/flux.1-kontext-dev - Provider Model ID: fal-ai/flux-kontext/dev/text-to-image - Pricing: - source: official - currency: USD - components: [{"type" => "output", "metric" => "image", "unit_price" => 0.025}] - source_url: https://fal.ai/models/fal-ai/flux-kontext/dev - effective_at: 2025-12-28 ## Image Gallery 3 images available for this model. - Curated examples: 3 - "A wide, cinematic shot of a high-end, minimalist creative studio at golden hour. On a polished concrete wall, the nam..." - "A hyper-realistic close-up shot of a vintage leather explorer's satchel resting on a rustic wooden table in a sunlit ..." - "A cozy indie bookstore storefront with a large glass window displaying a hand-painted sign that reads "LOFI & LITERAT..." ## Example Prompt The following prompt was used to generate an example image in our playground: A cozy indie bookstore storefront with a large glass window displaying a hand-painted sign that reads "LOFI & LITERATURE" in elegant serif typography. In the background shadows near the reading nook, a capybara is calmly napping on a rug. ## Code Examples ### Text to Image (Generation) #### 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.1-kontext-dev", "prompt": "A serene mountain landscape at sunset", "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.1-kontext-dev', prompt: 'A serene mountain landscape at sunset', 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.1-kontext-dev", prompt="A serene mountain landscape at sunset", size="1024x1024" ) # { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] } print(response.data[0].url) ### Image Editing #### cURL curl -X POST \ https://api.lumenfall.ai/openai/v1/images/edits \ -H "Authorization: Bearer $LUMENFALL_API_KEY" \ -F "model=flux.1-kontext-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.1-kontext-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.1-kontext-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.1 Kontext [dev] is an open-weights multimodal flow transformer developed by Black Forest Labs, designed specifically for in-context image generation and editing. It extends the foundational FLUX.1 architecture to allow for complex image-to-image workflows, enabling users to maintain consistent characters or styles across different compositions. This model is intended for non-commercial development and research, offering a high-fidelity bridge between text prompts and visual reference inputs. ## Strengths * **Character Consistency:** The model excels at maintaining the identity and features of a specific subject across multiple generated frames by leveraging reference images as "context." * **Zero-Shot Style Transfer:** It can adapt the aesthetic, color palette, and texture of a target image onto a new prompt without requiring specific LoRA training or fine-tuning. * **Complex Attribute Mapping:** It demonstrates high accuracy in following dense textual instructions while respecting the spatial constraints and structural information provided in the input image. * **Prompt Adherence:** Like other models in the FLUX.1 family, it minimizes common artifacts in hand rendering and manages high-density text within images effectively. ## Limitations * **Non-Commercial License:** The [dev] version is released under a restrictive license that prohibits revenue-generating applications, making it unsuitable for production environments without further licensing. * **Hardware Intensity:** Due to the flow transformer architecture and the multimodal input requirements, it demands significant VRAM and compute compared to standard latent diffusion models. * **Prompt Sensitivity:** Achieving the perfect balance between the input image context and the text prompt can require iterative testing, as the model may occasionally over-index on the reference image at the expense of prompt instructions. ## Technical Background FLUX.1 Kontext [dev] is built on a multimodal flow transformer architecture, a departure from traditional U-Net-based diffusion models. This approach uses flow matching to improve training efficiency and sampling quality. By integrating text and image embeddings into a shared latent space, the model treats visual context as a primary input alongside textual tokens, allowing for more natural in-context learning during the generation process. ## Best For FLUX.1 Kontext [dev] is best suited for storyboarding, character design sheets, and stylistic exploration where visual continuity is required across a series of images. It is an excellent choice for developers experimenting with advanced image-editing pipelines or researchers studying multimodal integration in large-scale generative models. You can experiment with its in-context capabilities through the Lumenfall unified API and playground, which simplifies the integration of its multimodal inputs into your development workflow. ## Frequently Asked Questions ### How much does FLUX.1 Kontext [dev] cost? FLUX.1 Kontext [dev] starts at $0.025 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing. ### How do I use FLUX.1 Kontext [dev] via API? You can use FLUX.1 Kontext [dev] through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "flux.1-kontext-dev". Code examples are available in Python, JavaScript, and cURL. ### Which providers offer FLUX.1 Kontext [dev]? FLUX.1 Kontext [dev] 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.1 Kontext [dev]? FLUX.1 Kontext [dev] supports images up to 2048x2048 resolution. ## Links - Model Page: https://lumenfall.ai/models/black-forest-labs/flux.1-kontext-dev - About: https://lumenfall.ai/models/black-forest-labs/flux.1-kontext-dev/about - Providers, Pricing & Performance: https://lumenfall.ai/models/black-forest-labs/flux.1-kontext-dev/providers - API Reference: https://lumenfall.ai/models/black-forest-labs/flux.1-kontext-dev/api - Benchmarks: https://lumenfall.ai/models/black-forest-labs/flux.1-kontext-dev/benchmarks - Use Cases: https://lumenfall.ai/models/black-forest-labs/flux.1-kontext-dev/use-cases - Gallery: https://lumenfall.ai/models/black-forest-labs/flux.1-kontext-dev/gallery - Playground: https://lumenfall.ai/playground?model=flux.1-kontext-dev - API Documentation: https://docs.lumenfall.ai