Black Forest Labs' 12-billion parameter multimodal flow transformer for in-context image generation and editing with character consistency, typography handling, and commercial-ready quality
Details
flux.1-kontext-pro
Starting from
Prices shown are in USD
See all providersProviders & Pricing (4)
FLUX.1 Kontext [pro] is available from 4 providers, with per-image pricing starting at $0.04 through fal.ai.
All modes
fal/flux.1-kontext-pro
fal/flux.1-kontext-pro-edit
fireworks/flux.1-kontext-pro
replicate/flux.1-kontext-pro
flux-kontext-pro API OpenAI-compatible
Developers can integrate FLUX.1 Kontext [pro] into creative workflows via Lumenfall's OpenAI-compatible API to perform high-fidelity text-to-image generation and complex image editing using a 12-billion parameter flow transformer.
https://api.lumenfall.ai/openai/v1
flux.1-kontext-pro
Code Examples
Text to Image
/v1/images/generationscurl -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-pro",
"prompt": "",
"size": "1024x1024"
}'
# Response:
# { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] }
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-pro',
prompt: '',
size: '1024x1024'
});
// { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] }
console.log(response.data[0].url);
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-pro",
prompt="",
size="1024x1024"
)
# { created: 1234567890, data: [{ url: "https://...", revised_prompt: "..." }] }
print(response.data[0].url)
Image Edit
/v1/images/editsParameter Reference
Core Parameters
| Parameter | Type | Description | Modes |
|---|---|---|---|
prompt
|
string | Required. Text prompt for image generation |
T2I
Edit
|
seed
|
integer | Random seed for reproducibility |
T2I
Edit
|
Size & Layout
| Parameter | Type | Description | Modes |
|---|---|---|---|
size
|
string |
Image dimensions as WxH pixels (e.g. "1024x1024") or aspect ratio (e.g. "16:9")
WxH determines both shape and scale (aspect_ratio and resolution are ignored when size is provided). W:H format is equivalent to aspect_ratio.
|
T2I
Edit
|
aspect_ratio
|
string |
Aspect ratio of the output image (e.g. "16:9", "1:1")
Controls shape independently of scale. Use with resolution to control both. If size is also provided, size takes precedence. Any ratio is accepted and mapped to the nearest supported value.
|
T2I
Edit
|
resolution
|
string |
Output resolution tier (e.g. "1K", "4K")
auto
1K
Controls scale independently of shape. Higher tiers produce larger images and cost more. If size is also provided, size takes precedence for scale. Any tier is accepted and mapped to the nearest supported value.
|
T2I
Edit
|
| Output |
size
|
aspect_ratio
+
resolution
|
|
|---|---|---|---|
| Flexible | |||
| Auto | "auto" |
— | Model chooses optimal dimensions |
1K 13 sizes
| Output |
size
|
aspect_ratio
+
resolution
|
|
|---|---|---|---|
| 1183 × 887 | "1183x887" |
or |
"4:3"
+
"1K"
|
| 916 × 1145 | "916x1145" |
or |
"4:5"
+
"1K"
|
| 1145 × 916 | "1145x916" |
or |
"5:4"
+
"1K"
|
| 1024 × 1024 | "1024x1024" |
or |
"1:1"
+
"1K"
|
| 887 × 1182 | "887x1182" |
or |
"3:4"
+
"1K"
|
| 724 × 1448 | "724x1448" |
or |
"1:2"
+
"1K"
|
| 1448 × 724 | "1448x724" |
or |
"2:1"
+
"1K"
|
| 836 × 1254 | "836x1254" |
or |
"2:3"
+
"1K"
|
| 1254 × 836 | "1254x836" |
or |
"3:2"
+
"1K"
|
| 768 × 1365 | "768x1365" |
or |
"9:16"
+
"1K"
|
| 1365 × 768 | "1365x768" |
or |
"16:9"
+
"1K"
|
| 670 × 1564 | "670x1564" |
or |
"9:21"
+
"1K"
|
| 1563 × 670 | "1563x670" |
or |
"21:9"
+
"1K"
|
How these parameters work
size
Exact pixel dimensions
"1920x1080"
aspect_ratio
Shape only, default scale
"16:9"
resolution
Scale tier, preserves shape
"1K"
Priority when combined
size is most specific and always wins. aspect_ratio and resolution control shape and scale independently.
How matching works
7:1 on a model with
4:1 and 8:1,
you get 8:1.
0.5K 1K 2K 4K)
or megapixel tiers (0.25 1).
If the exact tier isn't available, you get the nearest one.
Media Inputs
| Parameter | Type | Description | Modes |
|---|---|---|---|
image
|
file |
Required.
Input image(s) to edit
Supports PNG, JPEG, WebP.
|
T2I
Edit
|
Output & Format
| Parameter | Type | Description | Modes |
|---|---|---|---|
response_format
|
string |
How to return the image
url
b64_json
Default:
"url" |
T2I
Edit
|
output_format
|
string |
Output image format
png
jpeg
gif
webp
avif
Gateway converts to requested format if provider doesn't support it natively.
|
T2I
Edit
|
output_compression
|
integer | Compression level for lossy formats (JPEG, WebP, AVIF) |
T2I
Edit
|
n
|
integer |
Number of images to generate
Default:
1Gateway generates multiple images in parallel even if provider only supports 1.
|
T2I
Edit
|
Additional Parameters
| Parameter | Type | Description | Modes |
|---|---|---|---|
cfg_scale
|
number | Classifier-free guidance scale — higher values stick more closely to the prompt |
T2I
Edit
|
enhance_prompt
fal
|
boolean | Whether to enhance the prompt for better results. |
T2I
Edit
|
prompt_upsampling
replicate
|
boolean | Automatic prompt improvement |
T2I
Edit
|
safety_tolerance
|
string |
The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive.
1
2
3
4
5
6
|
T2I
Edit
|
sync_mode
fal
|
boolean | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. |
T2I
Edit
|
Parameter Normalization
How we handle parameters across different providers
Not every provider speaks the same language. When you send a parameter, we handle it in one of four ways depending on what the model supports:
| Behavior | What happens | Example |
|---|---|---|
passthrough |
Sent as-is to the provider | style, quality |
renamed |
Same value, mapped to the field name the provider expects | prompt |
converted |
Transformed to the provider's native format | size |
emulated |
Works even if the provider has no concept of it | n, response_format |
Parameters we don't recognize pass straight through to the upstream API, so provider-specific options still work.
Gallery
View all 4 imagesFLUX.1 Kontext [pro] FAQ
How much does FLUX.1 Kontext [pro] cost?
FLUX.1 Kontext [pro] starts at $0.04 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing.
How do I use FLUX.1 Kontext [pro] via API?
You can use FLUX.1 Kontext [pro] through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "flux.1-kontext-pro". Code examples are available in Python, JavaScript, and cURL.
Which providers offer FLUX.1 Kontext [pro]?
FLUX.1 Kontext [pro] is available through fal.ai, Fireworks AI, and Replicate on Lumenfall. Lumenfall automatically routes requests to the best available provider.
What is the maximum resolution for FLUX.1 Kontext [pro]?
FLUX.1 Kontext [pro] supports images up to 2048x2048 resolution.
Overview
FLUX.1 Kontext [pro] is a 12-billion parameter multimodal flow transformer developed by Black Forest Labs, designed specifically for in-context image generation and editing. It extends the capabilities of the standard FLUX.1 architecture by allowing users to provide image inputs as references to maintain character consistency and stylization across frames. This model is engineered to balance high-fidelity visual output with complex instruction following, making it a professional-grade tool for coherent visual storytelling.
Strengths
- Contextual Character Consistency: Excels at maintaining the identity, features, and attire of a subject across multiple generated images by utilizing image-to-image reference capabilities.
- Typography and Text Rendering: Demonstrates high precision in rendering complex text strings and layouts, significantly reducing the “gibberish” artifacts common in earlier diffusion models.
- In-Context Editing: Capable of performing precise edits on existing images while preserving the original composition, lighting, and style.
- High Parameter Density: The 12B parameter architecture allows for a nuanced understanding of long, descriptive prompts, resulting in imagery that closely adheres to specific spatial and stylistic instructions.
- Commercial-Ready Output: Produces 1MP+ resolution images with realistic textures, accurate human anatomy, and professional-grade lighting suitable for production environments.
Limitations
- Computational Demand: Due to its 12-billion parameter count, inference is more resource-intensive and slower compared to “schnell” or “dev” variants of the FLUX family.
- Prompt Sensitivity: To achieve the highest levels of character consistency, users often need to provide high-quality, clear reference images; low-resolution or cluttered references can degrade the output quality.
- Higher Latency: Not optimized for real-time applications, as the multimodal flow transformer architecture prioritizes output depth over generation speed.
Technical Background
FLUX.1 Kontext [pro] is built on a multimodal flow transformer architecture, a design choice that facilitates better alignment between text prompts and visual data compared to standard U-Net architectures. It utilizes flow matching, a training technique that simplifies the generative process by learning a direct path between noise and the target image distribution. This 12B parameter model was trained to process both text tokens and image patches simultaneously, allowing the “context” (reference images) to directly influence the generation process at the latent level.
Best For
This model is ideal for storyboarding, character design for gaming or film, and brand-consistent marketing campaigns where a single character or product must appear in various environments. It is a strong choice for graphic design tasks that require embedded, legible text within a scene. FLUX.1 Kontext [pro] is available through Lumenfall’s unified API and playground, allowing developers to integrate high-consistency image generation into their workflows with a single integration.
Try FLUX.1 Kontext [pro] in Playground
Generate images with custom prompts — no API key needed.