Flux Kontext Pro Edit API

blackforestlabs/flux-kontext-pro
image_urls · size · output_format

Flux Kontext Pro Edit transforms images via natural language instructions, enabling mask-free edits and targeted text replacement. It preserves source facial identity and lighting direction while applying precise alterations.

Get API Key
Input
Required0/2000
Required
Optional
Optional
OutputIdle

Generated images will appear here

Estimated cost: 8 credits · $0.040

8 credits ($0.040) per generation.

Continue using

Examples

pro-edit-02-output.jpg

Replace the painted name on the bow "MARISOL" with "ALBATROS". Paint the new letters in the same hand-painted white capital lettering style, same size, same brush texture, with the same chipping and weathering as the rest of the hull. Keep everything else unchanged: the boat, its sky blue hull and white stripe, the rope and buoy, the pebble beach, the palafito stilt houses, the hills, the overcast light and the camera framing.

pro-edit-01-output.png

Change the time of day from bright midday to late night. The only light source is now a single old tin oil lantern with a warm flickering flame, placed on the ground to the left of the woman, casting warm orange light across her face, hands and the textile and long soft shadows on the wall. The sky above the courtyard becomes deep navy with a few stars, the turquoise door and bougainvillea fall mostly into shadow. Keep everything else exactly the same: the woman's face, expression, pose, braid with red ribbons, embroidered huipil, the exact position of her hands on the batten, the diamond pattern of the textile, the loom, the post, the clay jar and the camera framing.

pro-edit-03-output.jpg

Remove the stacked white plastic chairs, the yellow bucket, the grey mop and the green garden hose. Fill in the areas behind them with the matching zellige mosaic fountain tiles and patterned floor tiles, continuing the existing geometric pattern and the diagonal late-afternoon light and shadows. Keep the fountain, the water, the arches, the carved balconies, the orange trees in terracotta pots and the camera framing exactly the same.

Flux Kontext Pro Edit

Flux Kontext Pro Edit is an in-context image editing model created by Black Forest Labs. Powered by a flow-matching transformer, it eliminates manual brush masking to perform object modification, styling changes, and in-image typography replacement directly from conversational prompts. Delivering results in 5–6 seconds while preserving subject identity, it streamlines character design and ecommerce workflows.

Why Choose Flux Kontext Pro Edit API?

  • Mask-Free Natural Language EditingEliminate tedious pixel brushwork; simple conversational prompts guide local modifications while freezing background details and untouched object textures.

  • Faithful Subject and Identity PreservationMaintains facial features, key character traits, and anatomical proportions across complex wardrobe, posture, and lighting transformations.

  • Precise In-Image Text ReplacementDirectly update copy on signs, posters, packaging, and book covers while matching the original typography, perspective slant, and material sheen.

  • Fast 5–6s Iterative RefinementInteractive flow-matching inference enables rapid multi-turn adjustments, letting creators build upon prior outputs to reach commercial perfection.

Parameters

ParameterRequirementDescription
promptRequired

Describe the requested image changes using 1–2,000 characters, including at least one non-whitespace character.

image_urlsRequired

Provide exactly 1 publicly accessible HTTP(S) image URL as the source image. Enter a URL or upload an image.

sizeOptional

Output aspect ratio. Defaults to 1:1.

Default1:14:33:416:99:1621:99:21
output_formatOptional

Output image file format: png or jpg.

pngjpg

How to Use

  1. Provide Source Image and InstructionsSubmit a clear HTTP(S) image URL and describe both the desired modifications and what should be kept unchanged (e.g., change the jacket to blue while keeping the same face and background).

  2. Select Aspect Ratio and FormatSet the output ratio to match your destination layout (such as 1:1, 16:9, or 9:16) and choose png or jpg format.

  3. Submit Task and Download OutputSend the request to receive a task_id, monitor status via polling or webhook, and feed the output URL into subsequent calls for multi-turn editing.

Pricing

Each generation costs 8 credits ($0.040) and returns one edited image.

UsageRateDetails
Standard edit8 credits/generation · $0.040/generationApplies to every size aspect ratio and output_format option

Best Use Cases

  • Ecommerce Backdrop and Environment SwapsTransform plain studio shots of apparel or accessories into outdoor lifestyle or luxury architectural scenes with coherent ambient reflections.

  • Packaging Localization and Copy UpdatesReplace headline copy, slogans, and pricing on promotional banners and retail packages without commissioning full reshoots.

  • Consistent Character StoryboardingRetain a consistent protagonist across different story panels, altering attire, facial expressions, and settings seamlessly.

Pro Tips

  • State what to change and what to keep: The most effective prompts explicitly mention both elements, e.g., Replace the sedan with a silver sports car while keeping the exact trees, road, and sunlight.
  • Use quotation marks for text edits: For typography adjustments, use clean patterns like Replace 'SPRING' with 'AUTUMN' in the same wooden sign font.
  • Break multifaceted edits into steps: If you intend to change wardrobe, hair, and scene lighting all at once, conduct two sequential edits to maintain maximum fidelity.

Notes

  • Single-image requirement: This endpoint requires exactly 1 valid public HTTP(S) image URL in image_urls; for text-only creation without an existing picture, use Flux Kontext Pro Text to Image.
  • Prompt length: Instructions must be between 1 and 2,000 characters long after removing outer whitespace.
  • Flat billing guarantee: Each edit is charged 8 credits ($0.040); tasks that encounter system execution errors are automatically refunded.

Related Models

Flux Kontext Pro Edit API Frequently Asked Questions

What is the Flux Kontext Pro Edit API?

Flux Kontext Pro Edit is a Black Forest Labs model for high-precision instruction-based image editing. It modifies source images according to natural-language prompts, featuring mask-free targeted editing, seamless in-image text replacement, and rapid 5–6 second inference speeds. Built on an in-context flow-matching transformer architecture, it preserves the reference subject's identity, composition, and illumination while executing requested changes. You can call it programmatically or try it from the playground above.

Do I need to supply a mask for Flux Kontext Pro Edit?

No. Flux Kontext Pro Edit relies on an in-context visual understanding architecture that identifies which regions to modify purely from your text prompt, eliminating the need to paint or upload selection masks.

How does Flux Kontext Pro Edit maintain facial identity?

The model preserves character consistency by conditioning on the source image tokens throughout the generative flow. Adding explicit prompt clauses such as while keeping the exact face, skin tone, and hairstyle provides optimal identity retention.

Can Flux Kontext Pro Edit replace existing text in an image?

Yes. It is engineered for text modification on signs, posters, and packages. Enclose both the original and replacement text in quotes within the prompt, for example Replace 'SALE' with 'NEW', and mention keeping the existing font style.

What image formats are supported by Flux Kontext Pro Edit?

You can supply standard web formats including JPG, JPEG, PNG, and WEBP via a publicly accessible HTTP or HTTPS URL in the image_urls array. Clear, well-lit reference images yield the highest editing precision.

Can I perform multi-turn iterative edits with Flux Kontext Pro Edit?

Yes. You can take the resulting image URL from your first edit and submit it as the source image in your next request, enabling multi-step creative refinement while preserving cumulative visual coherence.

Which endpoint should I choose for swapping image backgrounds?

Flux Kontext Pro Edit is the ideal choice for single-image background swaps. At 8 credits per generation and 5–6 second execution, it effortlessly replaces surroundings while maintaining subject positioning and blending natural lighting.