Flux 2 Max icon

Flux 2 Max API

Highest-quality Flux 2 tier.

Integrate Flux 2 Max with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.

model: "flux-2-max"

What's special about Flux 2 Max

  • Outputs at 0.5MP / 1MP / 2MP / 4MP.
  • 5 aspect ratios, including 1:1, 3:4, 4:3.
  • Image-to-image editing and reference-image support.
  • Fast turnaround — about 20s per generation on average.
  • Pay-as-you-go pricing with no Black Forest Labs account required — you only pay for successful generations.
  • One API key, unified billing, idempotency and webhooks across every Apiframe model.

Made with Flux 2 Max

A few outputs generated through the Flux 2 Max API on Apiframe.

Sample coming soon

A cinematic portrait of an astronaut in a neon-lit alley, 85mm, shallow depth of field

Sample coming soon

Cozy isometric coffee shop, warm morning light, highly detailed 3D render

Sample coming soon

A majestic snow leopard on a misty mountain ridge at golden hour

Overview

Endpoint
POST /v2/images/generate
Model ID
flux-2-max
Params key
fluxParams
Modality
image
Provider
Black Forest Labs
Pricing
Pay-as-you-go
Avg. completion
~20s

Capabilities

Aspect ratios1:1, 3:4, 4:3, 9:16, 16:9
Resolutions0.5MP, 1MP, 2MP, 4MP
Image inputSupported
Avg. time~20s

Quick start

Send a single POST /v2/images/generate request with your API key to generate with Flux 2 Max. The call returns a jobId you can poll or receive via webhook.

curl -X POST https://api.apiframe.ai/v2/images/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
        "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
        "model": "flux-2-max",
        "fluxParams": {
            "resolution": "2MP",
            "image_prompt": "https://example.com/input.jpg",
            "image_prompt_strength": 0.5,
            "output_format": "jpg"
        }
    }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/images/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
        "model": "flux-2-max",
        "fluxParams": {
            "resolution": "2MP",
            "image_prompt": "https://example.com/input.jpg",
            "image_prompt_strength": 0.5,
            "output_format": "jpg"
        }
    },
)
print(response.json())  # { "jobId": "...", "status": "QUEUED" }
const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
    "model": "flux-2-max",
    "fluxParams": {
      "resolution": "2MP",
      "image_prompt": "https://example.com/input.jpg",
      "image_prompt_strength": 0.5,
      "output_format": "jpg"
    }
  }),
});
const { jobId } = await response.json();
console.log(jobId);

Response & job lifecycle

Generation is asynchronous. A successful submission returns 202 Accepted with a jobId. Poll GET /v2/jobs/{id} (or supply a webhook_url) until the status is COMPLETED; the result field then holds the output URL(s).

1. Submission response (202)

{
  "jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "status": "QUEUED"
}

2. Poll for the result

curl https://api.apiframe.ai/v2/jobs/JOB_ID \
  -H "X-API-Key: afk_your_api_key_here"
import requests, time

while True:
    job = requests.get(
        "https://api.apiframe.ai/v2/jobs/JOB_ID",
        headers={"X-API-Key": "afk_your_api_key_here"},
    ).json()
    if job["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(2)
print(job["result"])
let job;
do {
  await new Promise((r) => setTimeout(r, 2000));
  job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
    headers: { "X-API-Key": "afk_your_api_key_here" },
  }).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);

Input schema

Request parameters accepted by the Flux 2 Max endpoint. Model-specific options are nested under the params object shown below.

Parameter Type Required Default Allowed / range Description
prompt string required Text description of what to generate.
model string required "flux-2-max" "flux-2-max" The model identifier for this endpoint.
fluxParams.resolution string optional "2MP" "0.5MP", "1MP", "2MP", "4MP" Resolution
fluxParams.image_prompt string (URL) optional Reference image (URL)
fluxParams.image_prompt_strength number optional 0.5 min 0, max 1, step 0.05 How closely to follow the reference image (0–1).
fluxParams.output_format string optional "jpg" "jpg", "png", "webp" Output format
fluxParams.output_quality number optional 90 min 0, max 100, step 1 Output quality
fluxParams.prompt_upsampling boolean optional false Let the model rewrite your prompt for better quality.
fluxParams.seed number optional step 1 Reuse a number to reproduce the same result.

Frequently Asked Questions

Common questions about the Flux 2 Max API.

Is there an API for Flux 2 Max?

Yes. Apiframe exposes Flux 2 Max through a single REST endpoint (`POST /v2/images/generate` with `model: "flux-2-max"`). You get one unified API, key, and billing across every supported model — no separate Black Forest Labs account required.

How much does the Flux 2 Max API cost?

Flux 2 Max uses simple pay-as-you-go pricing on Apiframe — you only pay for successful generations. See the pricing page for plans and volume discounts.

How do I call the Flux 2 Max API?

Send a POST request to `/v2/images/generate` with your `X-API-Key` and a JSON body containing `model: "flux-2-max"`. The call returns a `jobId`; poll `GET /v2/jobs/{id}` or use a webhook to receive the result.

What parameters does Flux 2 Max support?

Flux 2 Max accepts 7 model-specific parameters (nested under `fluxParams`) plus the common `prompt` and `webhook_url` fields. See the input schema above for the full list with types and defaults.

Still have questions?

Start building with the Flux 2 Max API

Get your API key and integrate Flux 2 Max in minutes — Pay-as-you-go.

Free credits to start
One API for every model
Webhooks, SDKs & idempotency
No provider account required

Questions? Join our Discord or contact sales.