Flux Kontext Max API

flux-pro/kontext/max
FLUX.
Output
$0.08 / gen (variable)
Released
Oct 13, 2025

Overview

What is Flux Kontext Max API?

FLUX.1 Kontext Max is the highest-capability Kontext model for complex text-to-image tasks with maximum fidelity.

Technical Specifications
- Supported inputs: Image, Text
- Output: Image
- Endpoint: /images/generations

Performance Benchmarks
[embed]

Flux Kontext Max API Pricing
- Pricing on request

Where to Use Flux Kontext Max

High-volume image generation
Produce product visuals, thumbnails, and marketing assets programmatically at scale.

Creative and concept art
Turn text prompts into illustrations, mockups, and design explorations.

Image editing and variations
Provide a reference image to guide edits, restyles, or variations.

Code Sample
[embed]

Use cases

Flux Kontext Max is documented for context-aware image editing, especially modifying existing images while preserving overall scene coherence and consistency. It is also suited to typography-heavy edits, where prompt adherence and typography generation are emphasized. Another documented use is high-fidelity editing of complex, multi-element scenes, including precise local changes and composition control.

How to use Flux Kontext Max API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to flux-pro/kontext/max.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/images/generations",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "flux-pro/kontext/max",
      "prompt": "A cat holding a sign that says hello"
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "flux-pro/kontext/max",
    "prompt": "A cat holding a sign that says hello"
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/images/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"flux-pro/kontext/max","prompt":"A cat holding a sign that says hello"}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Flux Kontext Max API Pricing

TypePrice
Output
$0.08 / gen (variable)

Flux Kontext Max vs other models

ModelInputOutputContextBest for
$0.08 / gen (variable)
Image generation at scale
$0.25 / 1M tokens
$60 / 1M tokens
128K tokens
Image generation at scale
$5 / 1M tokens
$30 / 1M tokens
Image generation at scale
$0.25 / gen
Image generation at scale
$0.015 / MP (variable)
Image generation at scale

Frequently asked questions

Flux Kontext Max takes image, text as input and returns image.

Flux Kontext Max is priced at $0.104 / gen (variable).

Flux Kontext Max is billed per generation — a fixed charge per output rather than by prompt length.

Yes, Flux Kontext Max accepts image input as well as a text prompt.

Flux Kontext Max was built by Black Forest Labs.

Send a request to https://api.aimlapi.com/v1/images/generations with flux-pro/kontext/max as the model id.

Yes. Flux Kontext Max is served through AI/ML API, so the same key and endpoint format used for other models applies.

It is an image-to-image model built for high-fidelity, context-aware image editing and transformation.

It is an image generation model, specifically focused on image-to-image editing tasks.

Start building with Flux Kontext Max

Get API Key
1000+ models, one API.