Skip to main content
POST
/
images
/
flux-2-pro
Generate an image — FLUX 2 Pro
curl --request POST \
  --url https://api.budgetpixel.com/v1/images/flux-2-pro \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>",
  "aspect_ratio": "1:1",
  "num_images": 1,
  "seed": 123,
  "size": "1MP"
}
'
{
  "estimated_time": "15 seconds",
  "job_id": 3436,
  "message": "<string>"
}

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

estimated_time
string
Example:

"15 seconds"

job_id
integer
Example:

3436

message
string
status
enum<string>

Lifecycle state. succeeded/failed/timeout are terminal.

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