Skip to main content
POST
Generate image with FLUX 2 Pro

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.

aspect_ratio
enum<string>
default:1:1

Output aspect ratio.

Available options:
1:1,
4:3,
3:4,
9:16,
16:9,
2:3,
3:2
image
string

Optional image-to-image input. Provide a public image URL, a data URI, raw base64, or an uploaded-file URL from POST /v1/uploads. Omit for text-to-image.

num_images
integer
default:1

Number of images to generate.

Required range: 1 <= x <= 4
seed
integer

Seed for reproducible generation. Omit for random.

size
enum<string>
default:1MP

Output resolution (megapixels).

Available options:
0.5MP,
1MP,
2MP,
4MP

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