⌘K

FLUX.2 [pro]

flux_2_pro

Flux2 Pro is the second generation professional image generation model with improved quality and faster processing.

Authentication

authorization string required

All APIs require authentication via Bearer Token

Get API Key:

Visit API Key Management Page to get your API Key

Usage:

Add to request header:

Authorization: Bearer YOUR_API_KEY

Parameters

model string required

Model ID to use for the request

Options: flux_2_pro


prompt string required

Prompt


input_image string

Path to the first input image


input_image_2 string

Path to the second input image


input_image_3 string

Path to the third input image


input_image_4 string

Path to the fourth input image


input_image_5 string

Path to the fifth input image


input_image_6 string

Path to the sixth input image


input_image_7 string

Path to the seventh input image


input_image_8 string

Path to the eighth input image


seed integer

Random seed for result reproducibility


width integer

Image width, must be a multiple of 32

Minimum: 64


height integer

Image height, must be a multiple of 32

Minimum: 64


safety_tolerance string

Input and output moderation tolerance level. 0 means strictest, 6 means least strict

Range: 1 - 6


output_format string

Output format

Options: jpeg, png

Default: jpeg


Polling

Since image generation takes time, you need to poll the task status after creation

The initial response returns the task ID and initial status. The actual generation results must be obtained through polling the task status endpoint

Response Format

error object

Error information, only present when status is failed

code string

Error code

message string

Detailed error message


output array

Generation results, only present when status is completed

content array

List of generated content

type string

Resource type, e.g., image

url string

Generated content URL


usage object

Usage statistics, only present when status is completed

cost string

Total cost in USD

discount number

Discount amount


metadata object

Metadata information


Error Codes

Error information is provided in the error field when status is failed