# BFL Flux 3.1 Fast Text to Image API

> FLUX 3.1 Fast by Black Forest Labs generates images from a text prompt, with optional bounding boxes for layout control, at 1K to 4K resolution tiers. Fast mode is tuned for volume at a lower price.

Source: https://www.sandbase.ai/models/bfl/flux-3.1/fast/text-to-image
API reference: https://www.sandbase.ai/models/bfl/flux-3.1/fast/text-to-image#api

## Facts

- Provider: BFL
- Type: Image model
- Model ID: `bfl/flux-3.1/fast/text-to-image`
- Price: From $0.01 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-3.1/fast/text-to-image",
  "prompt": "A red fox leaping over a stream in a pine forest, low-angle wildlife photograph.",
  "resolution": "1k",
  "output_format": "jpeg"
}'
```

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 3.1 Fast Text to Image through SandBase?

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

## README

### Flux 3.1 Fast Text to Image

FLUX 3.1 Fast by Black Forest Labs generates images from a text prompt, with optional bounding boxes for layout control, at 1K to 4K resolution tiers. Fast mode is tuned for volume at a lower price.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `prompt` | string, required | — | Text instruction. |
| `resolution` | `1k` / `2k` / `4k` | `1k` | Size tier; sets the per-image rate. |
| `aspect_ratio` | `21:9` / `16:9` / `3:2` / `4:3` / `5:4` / `1:1` / `4:5` / `3:4` / `2:3` / `9:16` | — | Output shape. |
| `output_format` | `jpeg` / `png` | `jpeg` | Output file format. |
| `bounding_boxes` | object[] | — | Optional layout boxes, with (0, 0) at the top-left. Place objects in given regions. Each box has a `description`, an optional `label`, and edges `{x_min, y_min, x_max, y_max}` as 0-1 fractions; Write `<label>` in the prompt to tie it to a box. |

#### Billing

BFL's official per-image price for FLUX 3.1 Image Fast: $0.015 at 1K, $0.04 at 2K, $0.11 at 4K. 

| Request | 1k | 2k | 4k |
|---|---|---|---|
| One image | $0.015 | $0.04 | $0.11 |

Failed runs are not charged.

#### Prompting

- Quote any text that must appear and say where it goes.
- Name a bounding box in the prompt by its label to control where that object goes.

#### Limits

- One output image per request.
- Maximum output size is 4 MP.

#### Also on SandBase

Other FLUX 3.1 endpoints: `bfl/flux-3.1/text-to-image`, `bfl/flux-3.1/edit`, `bfl/flux-3.1/fast/edit`. Previous generation: `bfl/flux-3/text-to-image`, `bfl/flux-3/edit`.
