# 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 - 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.1-kontext-dev?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 - `cfg_scale` (number): Classifier-free guidance scale — higher values stick more closely to the prompt. Modes: Image Edit, Text to Image - `acceleration` (string): The speed of the generation. The higher the speed, the faster the generation.. Values: high, none, regular. Modes: Image Edit, Text to Image. Only available via fal - `disable_safety_checker` (boolean): Disable NSFW safety checker. 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 - `enhance_prompt` (boolean): Whether to enhance the prompt for better results.. Modes: Image Edit, Text to Image. Only available via fal - `num_inference_steps` (integer): The number of inference steps to perform.. Modes: Image Edit, Text to Image - `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 - `resolution_mode` (string): Determines how the output resolution is set for image editing. - `auto`: The model selects an optimal resolution from a predefined set that best matches the input image's aspect ratio. This is the recommended setting for most use cases as it's what the model was trained on. - `match_input`: The model will attempt to use the same resolution as the input image. The resolution will be adjusted to be compatible with the model's requirements (e.g. dimensions must be multiples of 16 and within supported limits). Apart from these, a few aspect ratios are also supported.. Values: 16:9, 1:1, 21:9, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 9:21, match_input. Modes: Image Edit. Only available via fal - `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: Image Edit, Text to Image. Only available via fal ## Model Identifiers - Primary Slug: flux.1-kontext-dev ## Tags image-generation, text-to-image, image-editing, open-weights, non-commercial ## Available Providers ### fal.ai - Config Key: fal/flux.1-kontext-dev-edit - Provider Model ID: fal-ai/flux-kontext/dev - Pricing: $0.025/image - Source: https://fal.ai/models/fal-ai/flux-kontext/dev ### fal.ai - Config Key: fal/flux.1-kontext-dev - Provider Model ID: fal-ai/flux-kontext/dev/text-to-image - Pricing: $0.025/image - Source: https://fal.ai/models/fal-ai/flux-kontext/dev ### Replicate - Config Key: replicate/flux.1-kontext-dev - Provider Model ID: black-forest-labs/flux-kontext-dev - Pricing: $0.025/image - Source: https://replicate.com/black-forest-labs/flux-kontext-dev ## Image Gallery 3 images available for this model. Browse all at https://lumenfall.ai/models/black-forest-labs/flux.1-kontext-dev/gallery ### Curated Examples - [A wide, cinematic shot of a high-end, minimalist creative studio at golden hour. On a polished co...](https://assets.lumenfall.ai/DUAeo4mNK_EP_RdHL6jQpZ314XUlfSml26oTk6yDg_Y/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/ecb9rcd2asfmt5bftszz3ogvnpel@jpeg) - [A hyper-realistic close-up shot of a vintage leather explorer's satchel resting on a rustic woode...](https://assets.lumenfall.ai/tPIHHjEAQg8X6pxnonujRRh7RKpi4jVGb3lZNZ9wCtM/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/urfqknzdvndjm4c2wwoton8g7myb@jpeg) - [A cozy indie bookstore storefront with a large glass window displaying a hand-painted sign that r...](https://assets.lumenfall.ai/bSyCaWSHFnTG7EotOPadK3hoWF2Sjxx46E3cGEs70J4/rs:fit:1500:1500/plain/gs://lumenfall-prod-assets/oknw00l4u4igd78yuukodwwhfzw8@jpeg) ## 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 (/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.1-kontext-dev", "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.1-kontext-dev', 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.1-kontext-dev", 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.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 fal.ai and Replicate 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