Official

black-forest-labs / flux-kontext-pro

A state-of-the-art text-based image editing model that delivers high-quality outputs with excellent prompt following and consistent results for transforming images through natural language

  • Public
  • 3.7M runs
  • Commercial use
  • Weights
Iterate in playground

Input

input_image
*string
Shift + Return to add a new line

Text description of what you want to generate, or the instruction on how to edit the given image.

file

Image to use as reference. Must be jpeg, png, gif, or webp.

string

Aspect ratio of the generated image. Use 'match_input_image' to match the aspect ratio of the input image.

Default: "match_input_image"

integer

Random seed. Set for reproducible generation

string

Output format for the generated image

Default: "png"

integer
(minimum: 0, maximum: 6)

Safety tolerance, 0 is most strict and 6 is most permissive. 2 is currently the maximum allowed when input images are used.

Default: 2

Output

output
Generated in

Pricing

Model pricing for black-forest-labs/flux-kontext-pro. Looking for volume pricing? Get in touch.

$0.04
per output image

or 25 images for $1

Official models are always on, maintained, and have predictable pricing. Learn more.

Check out our docs for more information about how pricing works on Replicate.

Readme

FLUX.1 Kontext - Text-Based Image Editing

FLUX.1 Kontext is a state-of-the-art image editing model from Black Forest Labs that allows you to edit images using text prompts. It’s the best in class for text-guided image editing and offers superior results compared to other models like OpenAI’s 4o/gpt-image-1.

Available Models

  • FLUX.1 Kontext [pro]: State-of-the-art performance with high-quality outputs, great prompt following, and consistent results
  • FLUX.1 Kontext [max]: Premium model with maximum performance and improved typography generation

Coming soon

  • FLUX.1 Kontext [dev]: An open-weight distilled version

What You Can Do

Kontext excels at:

  • Style Transfer: Convert photos to different art styles (watercolor, oil painting, sketches)
  • Object/Clothing Changes: Modify hairstyles, add accessories, change colors
  • Text Editing: Replace text in signs, posters, and labels
  • Background Swapping: Change environments while preserving subjects
  • Character Consistency: Maintain identity across multiple edits

Prompting Best Practices

Be Specific

  • Use clear, detailed language with exact colors and descriptions
  • Avoid vague terms like “make it better”
  • Name subjects directly: “the woman with short black hair” vs. “she”

Preserve Intentionally

  • Specify what should stay the same: “while keeping the same facial features”
  • Use “maintain the original composition” to preserve layout
  • For background changes: “Change the background to a beach while keeping the person in the exact same position”

Text Editing Tips

  • Use quotation marks: “replace ‘old text’ with ‘new text’”
  • Stick to readable fonts
  • Match text length when possible to preserve layout

Style Transfer

  • Be specific about artistic styles: “impressionist painting” not “artistic”
  • Reference known movements: “Renaissance” or “1960s pop art”
  • Describe key traits: “visible brushstrokes, thick paint texture”

Complex Edits

  • Break into smaller steps for better results
  • Start simple and iterate
  • Use descriptive action verbs instead of “transform” for more control

Commercial Use

When using FLUX.1 Kontext on Replicate, you’re free to use outputs commercially in apps, marketing, or any business use.

Example Applications

Check out these specialized apps built with Kontext:

Tips Summary

  • Be specific with colors, styles, and descriptions
  • Start simple and iterate on successful edits
  • Preserve intentionally by stating what to keep unchanged
  • Use quotation marks for exact text replacements
  • Control composition by specifying camera angles and framing
  • Choose verbs carefully - “change” vs “transform” gives different results