⌘K

FLUX.2 [max]

flux_2_max

Flux 2 Max advanced image generation model. Supports text-to-image with multi-image input capabilities (up to 8 images), customizable dimensions, and enhanced creative control with prompt upsampling and safety tolerance settings.

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

Value: flux_2_max


prompt string required

Text prompt for image generation


input_image string | null

Path to the input image


input_image_2 string | null

Path to the second input image


input_image_3 string | null

Path to the third input image


input_image_4 string | null

Path to the fourth input image


input_image_5 string | null

Path to the fifth input image


input_image_6 string | null

Path to the sixth input image


input_image_7 string | null

Path to the seventh input image


input_image_8 string | null

Path to the eighth input image


seed integer | null

Optional seed for reproducibility


width integer | null

Width of the image

Default: 0

Range: x >= 64


height integer | null

Height of the image

Default: 0

Range: x >= 64


safety_tolerance integer

Tolerance level for input and output moderation, 0 is most strict, 6 is least strict

Default: 2

Range: 0 <= x <= 5


output_format enum<string> | null

Output format

Default: jpeg

Options: jpeg, png


webhook_url string<uri> | null

URL to receive webhook notifications

Range: string length 1 - 2083


webhook_secret string | null

Optional secret for webhook signature verification


Polling

Since result generation takes time, you need to poll the task status after creating the task.

The initial response only returns information such as the task ID and initial status. The final result must be obtained by polling the task status endpoint using the task ID.

See the examples on the right for polling requests and responses.

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