---
title: "Generate or edit an image with FLUX.2 [max]"
method: POST
path: "/v1/flux-2-max"
tags: ["Models"]
---

# Generate or edit an image with FLUX.2 [max]

`POST /v1/flux-2-max`

Submits an image generation or editing task with FLUX.2 [max]. Highest quality FLUX.2 model for image generation and editing, with the strongest editing consistency and prompt following.

## Request body

- Flux2Inputs
  - `prompt` string, required — Text prompt for image generation.
  - `disable_pup` boolean — Disable automatic prompt upsampling for this request. FLUX.2 [pro] and [max] apply prompt upsampling by default; set this to true to generate from your prompt exactly as written.
  - `input_image` string, nullable — Path to the input image.
  - `input_image_2` string, nullable — Path to the second input image.
  - `input_image_3` string, nullable — Path to the third input image.
  - `input_image_4` string, nullable — Path to the fourth input image.
  - `input_image_5` string, nullable — Path to the fifth input image.
  - `input_image_6` string, nullable — Path to the sixth input image.
  - `input_image_7` string, nullable — Path to the seventh input image.
  - `input_image_8` string, nullable — Path to the eighth input image.
  - `seed` integer, nullable — Optional seed for reproducibility.
  - `width` integer, nullable — Width of the image
  - `height` integer, nullable — Height of the image
  - `safety_tolerance` integer — Tolerance level for input and output moderation. Between 0 and 5, 0 being most strict, 5 being least strict. If you wish to increase the safety_tolerance beyond these levels please reach out to the team.
  - `output_format` 'jpeg' | 'png' | 'webp'
  - `webhook_url` string, uri, nullable — URL to receive webhook notifications
  - `webhook_secret` string, nullable — Optional secret for webhook signature verification

## Response `200`

Successful Response

- union
  - AsyncResponse
    - `id` string, required
    - `polling_url` string, required
    - `cost` number, nullable — Cost in credits for this request
    - `input_mp` number, nullable — Input megapixels (2 decimal places)
    - `output_mp` number, nullable — Output megapixels (2 decimal places)
  - AsyncWebhookResponse
    - `id` string, required
    - `status` string, required
    - `webhook_url` string, required
    - `cost` number, nullable — Cost in credits for this request
    - `input_mp` number, nullable — Input megapixels (2 decimal places)
    - `output_mp` number, nullable — Output megapixels (2 decimal places)

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/bfl/apis/bfl-api.md) · [All operations](https://skmtc.net/bfl/apis/bfl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/bfl/bfl-api/versions/a0209bab18e1/schema)
