Skip to main content
POST
Generate image with FLUX 3

Authorizations

Authorization
string
header
required

API key as a bearer token: Authorization: Bearer bpx_live_xxx

Body

application/json
prompt
string
required

Text description of the image to generate, or of the edit to apply to the reference images.

aspect_ratio
enum<string>
default:auto

Output aspect ratio. "auto" (default) follows the first reference image when editing, or lets the model pick a ratio from the prompt for text-to-image.

Available options:
auto,
1:1,
16:9,
9:16,
4:3,
3:4,
3:2,
2:3,
5:4,
4:5,
2:1,
1:2,
21:9,
9:21
grounding
boolean
default:true

Let the model research the prompt with web and image search before rendering (default true). Set false for faster, self-contained generation. Costs nothing extra.

num_images
integer
default:1

Number of images to generate. Each image is billed at its size's price.

Required range: 1 <= x <= 4
reference_images
string[]

Optional reference images (up to 10) for image editing and multi-reference composition. Each item is a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image. Reference images cost nothing extra.

Maximum array length: 10
size
enum<string>
default:1K

Output size by approximate pixel count: 768px ≈ 0.6 MP, 1K ≈ 1 MP, 1.5K ≈ 2 MP, 2K ≈ 4 MP, 4K ≈ 16 MP. Sets the price: 55 / 65 / 90 / 130 / 790 credits per image. 4K is returned as a JPEG, smaller sizes as PNG.

Available options:
768px,
1K,
1.5K,
2K,
4K

Response

Job accepted.

id
string

Opaque job id — use it to poll status.

Example:

"img_a1b2c3d4e5f6"

message
string
model
string
status
enum<string>

Lifecycle state. succeeded/failed/timeout are terminal.

Available options:
pending,
starting,
processing,
completing,
succeeded,
failed,
timeout