Skip to main content
POST
/
generation
/
black-forest-labs
/
flux-2-pro
FLUX 2 Pro
curl --request POST \
  --url https://open.ppt.video/api/v1/generation/black-forest-labs/flux-2-pro \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "<string>"
}
'
{
  "id": "<string>",
  "status": "starting",
  "usage": {
    "total": 0,
    "subscription": 0,
    "permanent": 0
  }
}
FLUX 2 Pro image generation model

Authorizations

Authorization
string
header
required

API Key for API endpoints

Body

application/json
prompt
string
required

Text prompt for image generation

n
integer
default:1

Number of results to generate (1-4)

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

Random seed. Set for reproducible generation

Required range: -9007199254740991 <= x <= 9007199254740991
width
integer | null

Width of the generated image. Only used when aspect_ratio=custom. Must be a multiple of 32 (if it's not, it will be rounded to nearest multiple of 32).

Required range: 256 <= x <= 2048
height
integer | null

Height of the generated image. Only used when aspect_ratio=custom. Must be a multiple of 32 (if it's not, it will be rounded to nearest multiple of 32).

Required range: 256 <= x <= 2048
resolution
enum<string>
default:1 MP

Resolution in megapixels. Up to 4 MP is possible, but 2 MP or below is recommended. The maximum image size is 2048x2048, which means that high-resolution images may not respect the resolution if aspect ratio is not 1:1.

Resolution is not used when aspect_ratio is 'custom'. When aspect_ratio is 'match_input_image', use 'match_input_image' to match the input image's resolution (clamped to 0.5-4 MP).

Available options:
match_input_image,
0.5 MP,
1 MP,
2 MP,
4 MP
aspect_ratio
enum<string>
default:1:1

Aspect ratio for the generated image. Use 'match_input_image' to match the first input image's aspect ratio.

Available options:
match_input_image,
custom,
1:1,
16:9,
3:2,
2:3,
4:5,
5:4,
9:16,
3:4,
4:3
input_images
string<uri>[]

List of input images for image-to-image generation. Maximum 8 images. Must be jpeg, png, gif, or webp.

output_format
enum<string>
default:webp

Format of the output images.

Available options:
webp,
jpg,
png
output_quality
integer
default:80

Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs

Required range: 0 <= x <= 100
safety_tolerance
integer
default:2

Safety tolerance, 1 is most strict and 5 is most permissive

Required range: 1 <= x <= 5

Response

Generation status

id
string
required

Generation id.

status
enum<string>
required

Generation status

Available options:
starting,
processing,
succeeded,
failed,
canceled
usage
object
required

Credit usage breakdown for the request