# BFL FLUX.1 Kontext [dev] API

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

Source: https://www.sandbase.ai/models/bfl/flux-2/kontext/dev
API reference: https://www.sandbase.ai/models/bfl/flux-2/kontext/dev/docs

## Facts

- Provider: BFL
- Type: Image model
- Model ID: `bfl/flux-2/kontext/dev`
- Price: $0.03 per run
- Capabilities: image to image
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "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
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call BFL FLUX.1 Kontext [dev] through SandBase?

Create a SandBase API key, then send requests with the model ID "bfl/flux-2/kontext/dev" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate BFL account?

No. One SandBase API key and balance gives you access to BFL FLUX.1 Kontext [dev] and the other models in the catalog; you do not need to sign up with BFL separately.

## README

### FLUX.1 Kontext [dev]

FLUX.1 Kontext [dev] edits a single image from an instruction: change objects, text, or style while keeping the rest consistent.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Text instruction. |
| `image` | image URL, required | — | Image to edit. JPEG, PNG, or WebP URL. |
| `guidance_scale` | number 1–20 | 2.5 | How strictly to follow the prompt. |
| `num_inference_steps` | integer 10–50 | 28 | More steps add detail and time. |
| `output_format` | `jpeg` / `png` | `jpeg` | Output file format. |
| `resolution_mode` | `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` | `match_input` | `match_input` keeps the input size; or choose a ratio. |
| `seed` | integer | random | Fix it to compare prompt changes. |

#### Billing

$0.025 per image.

| Request | Price |
|---|---|
| One image | $0.025 |

Failed runs are not charged.

#### Prompting

- State the change and what must stay the same.

#### Limits

- One input image.

#### Also on SandBase

Related: `bfl/flux-2/dev/edit` (FLUX.2, multi-image).
