Skip to main content

FLUX 3.1 Image

Generate and edit images up to 4K at high throughput, with painted masks, up to 10 reference images, and bounding boxes for layout and local edits.

Edit and control

Steer edits with written instructions, painted masks, and multi-reference inputs.

Bounding boxes

Author layouts and move, replace, or remove elements with structured bounding_boxes.

4K and custom sizing

Pick 1MP to 16MP, video frames (hd to uhd), or exact pixel dimensions without a divisible-by-16 constraint.

Web grounding

Pull real-world references for named subjects, landmarks, and species with grounding.

Quickstart

Set BFL_API_KEY to a key from the BFL dashboard, then submit a prompt:
Poll the returned polling_url until status is Ready:
cURL
When status is Ready, download the image from result.sample right away because the signed URL expires after 1 hour.
Each client submits the Quickstart prompt, polls until the task finishes, and saves the image. The Python generate() helper is used in the examples across the FLUX 3.1 Image docs. The cURL client requires jq.

Sizing

By default, FLUX 3.1 Image chooses an aspect ratio and resolution automatically from your prompt or first input image. Use the controls below to pick a preset or exact pixel size, or set both aspect_ratio and resolution to match_first_image on edits to keep the dimensions of images[0] (within the 0.25 to 16.82 MP bounds).

Quality and speed

Set mode to trade off maximum detail against faster, higher-volume generation. It defaults to "quality".
Antique botanical field notebook with pressed edelweiss generated in fast mode at 2MP

mode: "fast"

Antique botanical field notebook with pressed edelweiss generated in quality mode at 2MP

mode: "quality"

Web grounding

Use grounding to control whether FLUX 3.1 Image performs web lookups for real-world references such as landmarks, species, and named objects. It defaults to "off".
Python
Abstract gold metal flame sculpture floating above a rectangular reflecting pool when grounding is off

grounding: "off" (invents an abstract metal flame sculpture)

Real 2024 Paris Olympic hot-air balloon cauldron floating glowing above the Tuileries Garden basin at dusk with grounding forced

grounding: "force" (matches the real 2024 Paris Olympic hot-air balloon cauldron)

Examples

Every image below was generated with FLUX 3.1 Image:

Limits and responses

Without a webhook, each submit returns id and polling_url to poll directly. When you pass webhook_url (and optional webhook_secret), submit returns status: "processing" without a polling_url and delivers the result to your webhook instead.See the API reference for the full schema, Errors for shared HTTP codes (402, 422, 429), and Integration guidelines for production retry patterns.

Keep exploring

API reference

Full request schema, field constraints, and response codes for POST /v1/flux-3.1-image.

Prompting guide

Structure prompts for lighting, camera framing, typography, and edits.

Try in Playground

Run FLUX 3.1 Image in your browser without writing code.

Pricing

Compare resolution tiers and billing across BFL endpoints.