FLUX.1 Kontext [dev]

bfl/flux-2/kontext/dev

Flux 2 Kontext Dev by BFL - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.

Base price
$0.0013USD / run
Execution
async
Model type
image
Input fields
7

Try the model

Playground

Open playground
Input
The prompt to edit the image.

PNG, JPEG, WebP, or GIF · 20 MiB maximum

The URL of the image to edit. Max width: 14142px, Max height: 14142px, Timeout: 20s
120
The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. Range: 1 to 20.
1050
The number of inference steps to perform. Range: 10 to 50.
Output format Allowed values: jpeg, png.
Determines how the output resolution is set for image editing. - `auto`: The model selects an optimal resolution from a predefined set that best matches the input image's aspect ratio. This is the recommended setting for most use cases as it's what the model was trained on. - `match_input`: The model will attempt to use the same resolution as the input image. The resolution will be adjusted to be compatible with the model's requirements (e.g. dimensions must be multiples of 16 and within supported limits). Apart from these, a few aspect ratios are also supported. Allowed values: auto, match_input, 1:1, 16:9, 21:9, 3:2, 2:3, 4:5, 5:4, 3:4, 4:3, 9:16, 9:21.
The same seed and the same prompt given to the same version of the model will output the same image every time.
OutputReady

Your output will appear here

Complete the inputs, then click Run.

Specifications

Pricing

Base price
$0.0013 / run

Context & modalities

Input
Schema-defined
Output
image

Capabilities

Chat
Not supported
Vision
Not supported
Reasoning
Not supported
Structured output
Not supported
Function calling
Not supported
Audio input
Not supported

Access

Provider
BFL
Model ID
bfl/flux-2/kontext/dev
Execution
async
API
Unified Run API
Endpoint
/v1/run

API README

FLUX.1 Kontext [dev]

FLUX.1 Kontext [dev] edits and enhances photos from natural-language instructions. A required image supplies the visual foundation and a required prompt communicates the revision, creating a direct path from an existing asset to an updated one.

Guidance can be adjusted from 1 to 20 and inference steps from 10 to 50. The model also offers resolution modes including automatic, input-matched, square, landscape, and portrait choices, plus JPEG or PNG export and seed control.

Highlights

Photo-first revision. Begin with a required image so the edit remains connected to an existing asset.

Written creative direction. Use a required prompt to describe the change or enhancement in natural language.

Broad refinement controls. Tune guidance from 1–20 and inference steps from 10–50 for the intended generation pass.

Resolution and export choices. Select an automatic, input-matched, or fixed resolution mode, then export JPEG or PNG with an optional seed.

Pricing

Billing unitPrice
Per request$0.00125

When to Use

✅ Good fit❌ Consider alternatives
The model's named workflow matches the source material and intended outputA different input modality or model route is required
A managed asynchronous result is suitable for the production pipelineA synchronous, interactive editor is essential
The documented controls cover the required duration, framing, or formatThe project needs controls outside this endpoint's schema
Creative iteration benefits from a repeatable request structureExact deterministic pixels, frames, geometry, or samples are mandatory
A finished downloadable media asset is the desired deliverableEditable source layers or a native project file are required

Prompt Guide

For image-conditioned generation, state the intended result first, then add the subject or source treatment, progression, style, and delivery constraints. Keep one creative variable per phrase, use the documented field names for controls, and change one setting at a time when comparing results.

{
  "image": "https://example.com/start-frame.png",
  "output_format": "jpeg",
  "prompt": "Change the setting to a day time, add a lot of people walking the sidewalk while maintaining the same style of the painting"
}

Technical Specs

SpecValue
Model IDbfl/flux-2/kontext/dev
Inputsguidance_scale, image, num_inference_steps, output_format, prompt, resolution_mode, seed
Required inputsprompt, image
Output fieldscontent_type, url
ExecutionAsync (submit, then poll for result)
Output Formatjpeg / png

Related Models

Start building

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

Production API
Unified Run API endpoint
https://api.sandbase.ai/v1/run
Model ID
bfl/flux-2/kontext/dev
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "model": "bfl/flux-2/kontext/dev",
  "image": "https://static.sandbase.ai/examples/bfl/flux-2/kontext/dev/input_image_0.webp",
  "prompt": "Change the setting to a day time, add a lot of people walking the sidewalk while maintaining the same style of the painting",
  "output_format": "jpeg",
  "guidance_scale": 2.5,
  "resolution_mode": "match_input",
  "num_inference_steps": 28
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
  status=$(printf '%s' "$result" | jq -r .status)
  case "$status" in completed|failed|timeout) break ;; esac
  sleep 2
  result=$(curl --fail-with-body --silent \
    -H "Authorization: Bearer $SANDBASE_API_KEY" \
    "https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"

Choose your model

Compare models

All language models
ModelContextInput / 1MOutput / 1MReleased
BFL———May 28, 2025
BFL———May 28, 2026
BFL———May 21, 2026
BFL———May 14, 2026
BFL———Mar 17, 2026
BFL———Mar 17, 2026