Try it live - Test image editing in our playground by uploading an image and typing what you want to change.
Examples of Editing
Basic Object Modifications
FLUX.1 Kontext is really good at straightforward object modification, for example if we want to change the colour of an object, we can prompt it. For example:Change the car color to red

Before editing

After editing
Iterative Editing
FLUX.1 Kontext excels at character consistency, even after multiple edits. Starting from a reference picture, we can see that the character is consistent throughout the sequence. The prompts used for each edit are shown in the captions below each image.
Input Image

Remove the object from her face

She is now taking a selfie in the streets of Freiburg, it’s a lovely day out.

It’s now snowing, everything is covered in snow.
Text Editing
FLUX.1 Kontext can directly edit text that appears in images, making it easy to update signs, posters, labels, and more without recreating the entire image. The most effective way to edit text is using quotation marks around the specific text you want to change: Prompt Structure:Replace '[original text]' with '[new text]'
Example - We can see below where we have an input image with “Choose joy” written, and we replace “joy” with “BFL” - note the upper case format for BFL.

Input image

JOY replaced with BFL

Input image

Sync & Bloom changed to 'FLUX & JOY'
Edit Images with Annotation Boxes
FLUX.1 Kontext allows using bright colored boxes as annotations for targeted local editing. Local annotated edits specifically work well for text edits that require text repositioning and resizing. Annotation boxes make referencing specific parts of the image in your prompt even more seamless.
Input image with annotation

Replace text with 'COOL!!'
FLUX Kontext [pro] automatically acknowledges annotation boxes when included as part of
input_image
. In the output sample annotation boxes are removed automatically. Using FLUX.1 Kontext API for Image Editing
This requires both a text prompt and an input image to work, with the input image serving as the base that will be edited according to your prompt. To use Kontext for image editing, you’ll make a request to the/flux-kontext-pro
endpoint:
Create Request
Poll for Result
After submitting a request, you need to poll using the returnedpolling_url
to retrieve the output when ready.
result['sample']
is a signed URL for retrieval.
Our signed URLs are only valid for 10 minutes. Please retrieve your result within this timeframe.
FLUX.1 Kontext Image Editing Parameters
For image editing, FLUX.1 Kontext tries to match the input image dimensions as closely as possible (rounded to multiples of 32). Use
aspect_ratio
to override this behavior if needed.- Supported Range: Aspect ratios can range from 3:7 (portrait) to 7:3 (landscape).
/flux-kontext-pro
endpoint:
Parameter | Type | Default | Description | Required |
---|---|---|---|---|
prompt | string | Text description of the edit to be applied. | Yes | |
input_image | string | Base64 encoded image to use as reference. Supports up to 20MB or 20 megapixels. | Yes | |
aspect_ratio | string / null | "1:1" | Desired aspect ratio (e.g., “16:9”). All outputs are ~1MP total. Supports ratios from 3:7 to 7:3. | No |
seed | integer / null | null | Seed for reproducibility. If null or omitted, a random seed is used. Accepts any integer. | No |
prompt_upsampling | boolean | false | If true, performs upsampling on the prompt | No |
safety_tolerance | integer | 2 | Moderation level for inputs and outputs. Value ranges from 0 (most strict) to 6 (more permissive). | No |
output_format | string | "jpeg" | Desired format of the output image. Can be “jpeg” or “png”. | No |
webhook_url | string / null | null | URL for asynchronous completion notification. Must be a valid HTTP/HTTPS URL. | No |
webhook_secret | string / null | null | Secret for webhook signature verification, sent in the X-Webhook-Secret header. | No |