SandBase is live — $1 in free credits on signupStart free ›
Use in agentBFL models

BFL modelsimage generation api

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.

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.
Idle

Example output — click Run to generate your own

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

Related Models

bfl/flux-2/kontext/max/multiFlux 2 Kontext Max by BFL - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.bfl/flux-2/kontext/max/text-to-imageFlux 2 Kontext Max by BFL - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.bfl/flux-2/kontext/pro/multiFlux 2 Kontext Pro by BFL - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.bfl/flux-2/kontext/pro/text-to-imageFlux 2 Kontext Pro by BFL - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.bfl/flux-2/flexFlux 2 Flex is BFL's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.bfl/flux-2/flex/editFlux 2 Flex Edit by BFL - AI-powered image editing, style transfer, and transformation. Edit photos with natural language instructions, remove backgrounds, change styles, and enhance images effortlessly.bfl/flux-2/klein/4bFlux 2 Klein 4b is BFL's advanced text-to-image AI model. Create photorealistic images, illustrations, and concept art from natural language descriptions with exceptional detail and prompt adherence.bfl/flux-2/klein/4b/baseFlux 2 Klein 4b by BFL - generate stunning images from text prompts with state-of-the-art AI. Supports multiple aspect ratios, styles, and high-resolution output for creative and commercial use.