# BFL Flux 2 Flex Text to Image API

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

Source: https://www.sandbase.ai/model/bfl/flux-2/flex
API reference: https://www.sandbase.ai/model/bfl/flux-2/flex/docs

## Facts

- Provider: BFL
- Type: Image model
- Model ID: `bfl/flux-2/flex`
- Price: From $0.06 per run
- Capabilities: text 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/flex",
  "prompt": "A high-quality 3D render of a cute fluffy monster eating a giant donut; the fur simulation is incredibly detailed, the donut glaze is sticky and reflective, bright daylight lighting, shallow depth of field.",
  "aspect_ratio": "16:9",
  "output_format": "jpeg",
  "guidance_scale": 3.5,
  "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 2 Flex Text to Image through SandBase?

Create a SandBase API key, then send requests with the model ID "bfl/flux-2/flex" 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 2 Flex Text to Image and the other models in the catalog; you do not need to sign up with BFL separately.

## README

### Flux 2 Flex Text to Image

FLUX.2 [flex], the tunable tier: adjust steps and guidance for typography-heavy or detailed work. Text to image.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Text instruction. |
| `guidance_scale` | number 1.5–10 | 3.5 | How strictly to follow the prompt. |
| `num_inference_steps` | integer 2–50 | 28 | More steps add detail and time. |
| `output_format` | `jpeg` / `png` | `jpeg` | Output file format. |
| `aspect_ratio` | `21:9` / `16:9` / `3:2` / `4:3` / `5:4` / `1:1` / `4:5` / `3:4` / `2:3` / `9:16` | `16:9` | Output shape. |
| `seed` | integer | random | Fix it to compare prompt changes. |

#### Billing

$0.06 per image.

| Request | Price |
|---|---|
| One image | $0.06 |

Failed runs are not charged.

#### Prompting

- Write subject, setting, composition, style, then light.
- Quote any text that must appear.

#### Limits

- One output image per request.

#### Also on SandBase

Other FLUX.2 endpoints: `bfl/flux-2/max`, `bfl/flux-2/pro`, `bfl/flux-2/dev`, `bfl/flux-2/turbo`, `bfl/flux-2/flex/edit`.
