Runflow
Back to Gallery

black-forest-labs/flux-pro/kontext

FLUX.1 Kontext [pro] handles both text and reference images as inputs, seamlessly enabling targeted, local edits and complex transformations of entire scenes.

$0.04/image 2026-04-06

Install

pip install requests

Run the model

import requests

response = requests.post(
    "https://api.runflow.io/v1/run/flux-pro/kontext",
    headers={"Authorization": "Bearer RUNFLOW_API_KEY"},
    json={
    "prompt": "Add a fluffy orange tabby cat sleeping on the desk between the two monitors, ...",
    "image_url": "https://public.runflow.io/images/models/_shared/base-engineer.png"
    },
)

data = response.json()
print(data["images"][0]["url"])

Input schema

ParameterTypeDescription
promptstringEditing instruction describing the desired transformation.
image_urlimageURL of the source image to edit.
aspect_ratiostringOutput aspect ratio. Options: square_hd, square, portrait_4_3, portrait_16_9, landscape_4_3, landscape_16_9.
num_imagesintegerNumber of images to generate per request. Range: 1–4. Default: 1.
guidance_scalenumberHow closely the model follows the prompt. Range: 1–20. Default: 3.5.
output_formatstringOutput format. Options: "jpeg", "png". Default: "jpeg".
safety_tolerancestringContent moderation strictness. 1 = most strict, 6 = most permissive. Default: 2.
enhance_promptbooleanAutomatically enhance the prompt for better results. Default: false.
seedintegerRandom seed for reproducible outputs.
sync_modebooleanReturn media as data URI without storing in request history. Default: false.

Output schema

FieldTypeDescription
promptstringThe prompt used for generating the image.
imagesjsonThe generated image files info.
timingsjsonTimings
has_nsfw_conceptsjsonWhether the generated images contain NSFW concepts.
seedinteger Seed of the generated Image. It will be the same value of the one passed in the input or the randomly generated that was used in case none was passed.

Related models

Start generating with FLUX Kontext

Get API access in minutes. No GPU setup, no infrastructure to manage.