Model Details
FLUX.1 Kontext [pro] edits an image you provide by following a plain-language instruction. You pass a source photo and a prompt describing the change — swap an object, restyle the scene, replace the background, alter text, or adjust color — and it re-renders the image with that edit applied while keeping everything you didn't mention consistent. It is the production, closed-weights editing tier from Black Forest Labs: higher prompt adherence and stronger typography than the open-weights tier, tuned for commercial work, with commercial-usage rights included. Its strength is character and scene consistency across edits — faces, products, composition, and untouched regions stay stable instead of being regenerated from scratch, so iterative edits compound cleanly.
## Best for - Instruction edits to a photo — "change the wooden floor to white marble", "make it nighttime", "remove the person on the left" - Commercial and marketing edits where prompt adherence and clean typography matter (edit or add legible text and signage) - Restyling or relighting a scene while preserving the subject's identity and pose - Replacing or restyling backgrounds without regenerating the foreground - Iterative, multi-step edits where consistency must hold across rounds
## Choose another model when - You have no source photo and want to generate an image from a prompt alone — use a text-to-image model - You want the edited result animated or in motion — use an image-to-video model - You need a precisely masked inpaint of one region only — use a dedicated inpainting model - You want the lowest cost and can trade some prompt adherence for open weights — use FLUX.1 Kontext [dev]
## Tips - Describe the change precisely and name what should stay the same — Kontext keeps unmentioned regions consistent, so specific instructions edit less of the image - Leave `aspect_ratio` unset to match the source image's aspect (recommended for aligned before/after comparison); set it only when you deliberately want to reframe the output - Raise `guidance_scale` toward the higher end of its range for stronger adherence to the instruction; lower it if the edit looks over-applied
## Advanced Configuration - `guidance_scale` (1–20, default 3.5) controls how strongly the result follows the instruction; raise it for stronger edits, lower it if the edit looks over-applied. - `aspect_ratio` (unset by default) forces the output aspect ratio — one of `21:9`, `16:9`, `4:3`, `3:2`, `1:1`, `2:3`, `3:4`, `9:16`, `9:21`. Leave it unset to match the input image's aspect. - `safety_tolerance` (`1`–`6`, default `2`) sets content-moderation strictness: `1` is the strictest, `6` the most permissive. - `num_images` (1–4, default 1) sets how many edited variations to generate; each generated image is billed separately. - `output_format` selects `jpeg` (default) or `png`. - `enhance_prompt` (default false) automatically expands your instruction for potentially better results.
To run via the ModelRunner JavaScript client: ```js import { modelrunner } from "@modelrunner/client";
const result = await modelrunner.subscribe("black-forest-labs/flux-kontext/pro", { input: { prompt: "Change the wooden floor to white marble.", image_url: "https://media.modelrunner.ai/OnB0a9tFqLGcUP53RQ46n.png", guidance_scale: 3.5, output_format: "jpeg", }, }); ```




