FLUX.1 Kontext Max is a context-aware image model for editing and text-to-image generation, with predictable per-image pricing and asynchronous task processing.
Service Highlights

Image link valid for 72 hours
Transparent pricing with no hidden fees. Pay only for what you use.
| Variant | GoldCurrent price | Platinum | Diamond | Official | Your savings |
|---|---|---|---|---|---|
flux-kontext-max | 0.64Credits(~$0.064)/pic | 0.608Credits(~$0.0608)/pic | 0.576Credits(~$0.0576)/pic | 0.8Credits(~$0.08)/pic | 20% |
* Actual costs are subject to final output.
Call flux-kontext-max with one POST request. Generation is asynchronous: submit a task, then poll the task endpoint for the image URL.
Save your APIMart key in the APIMART_API_KEY environment variable and send it as Authorization: Bearer <key> on every request.
POST /v1/images/generations with model flux-kontext-max, your prompt and size. Add image_urls to edit up to four references. The example.com URLs are placeholders: replace them with your own publicly accessible images or Base64 data. The task ID is in data[0].task_id.
Poll GET /v1/tasks/{task_id} until status is completed, then read the image URL from data.result.images[0].url[0]. APIMart keeps results for 72 hours, so download the images you want to keep.
See the FLUX.1 Kontext API reference for every parameter, output size and response field.
curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-kontext-max",
"prompt": "A cozy reading nook with a green armchair, warm lamplight and rain on the window",
"size": "4:3",
"output_format": "png"
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"model": "flux-kontext-max",
"prompt": "A cozy reading nook with a green armchair, warm lamplight and rain on the window",
"size": "4:3",
"output_format": "png"
}
resp = requests.post(f"{API_BASE}/v1/images/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
for _ in range(200):
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
print(task["result"]["images"][0]["url"][0])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(3)
else:
raise TimeoutError(f"task {task_id} did not finish in time; continue GET polling with this task ID")curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-kontext-max",
"prompt": "Change the jacket to dark red leather and keep the person'\''s face, pose and background unchanged",
"size": "auto",
"output_format": "png",
"image_urls": [
"https://example.com/portrait.jpg"
]
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | Default: flux-kontext-max | Use flux-kontext-max. |
prompt | string | Required | Default: — | Describe the image to create, or the edit to apply to the reference images. |
image_urls | string[] | Optional | Default: — | Up to 4 reference images as public URLs or Base64. Omit for text-to-image. |
size | string | Optional | Default: 1:1 | 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9, 9:21 or auto. Output stays about 1 MP: width and height make the task fail, and resolution has no effect. |
output_format | string | Optional | Default: png | png, jpeg or webp. |
seed | integer | Optional | Default: — | Reuse the same seed and inputs to help reproduce a result; omit for a random seed. |
prompt_upsampling | boolean | Optional | Default: false | Let the model expand and rewrite the prompt before generation. |
safety_tolerance | integer | Optional | Default: 2 | 0 (strictest) to 6. |
nsfw_check | boolean | Optional | Default: false | Review the prompt and input images with omni-moderation-latest before submission. |
One APIMart API key calls every FLUX model below. Image models are billed per image and FLUX 3 Video per second of video.
| Model | Best for | Output |
|---|---|---|
| FLUX 3 Image API | The FLUX 3 API for images: generation and editing with up to 10 references, search grounding and output up to 4K | 768sq to 4K (about 16 MP) |
| FLUX 3 Image Klein API | Lower-cost FLUX 3 images with seed, 1–16 steps and PNG or JPEG output | 768sq to 4K (about 16 MP) |
| FLUX 3 Video API | Text to video, 1–10 keyframes, video continuation and drafts, with synced audio | HD or FHD, 5–20 s |
| FLUX.2 API | Choosing between FLUX.2 Pro, Max and Flex on one page | 1–4 MP |
| FLUX.2 Pro API | Balanced quality and cost for production images, up to 8 references | 1–4 MP |
| FLUX.2 Max API | The highest-quality FLUX.2 output, up to 8 references | 1–4 MP |
| FLUX.2 Flex API | Adjustable steps and guidance for typography and layout-heavy designs | 1–4 MP |
| FLUX.1 Kontext API | Choosing between FLUX.1 Kontext Pro and Max on one page | About 1 MP |
| FLUX.1 Kontext Pro API | Context-aware edits at a fixed price per image, up to 4 references | About 1 MP |
| FLUX.1 Kontext Max APIThis page | Higher-quality Kontext edits with stronger prompt adherence | About 1 MP |
Editing-first capabilities with predictable controls and one asynchronous workflow
Use a reference when visual context matters, or omit it for text-to-image generation
Create an account, authenticate, then submit and poll one unified image task
Sign in to APIMart and fund your balance. The same balance can be used across supported models.
Create a key in the dashboard and send it as a Bearer token in the Authorization header.
POST the request to /v1/images/generations, read data[0].task_id, and poll /v1/tasks/{task_id} until completed or failed.
Model choice, inputs, controls, billing, and task behavior
FLUX.1 Kontext Max is a context-aware image model from Black Forest Labs. It is designed primarily for image editing from text instructions and can also generate images from text alone.
flux-kontext-pro and flux-kontext-max both support text-to-image generation and reference-image editing; Max targets higher output quality. Both output approximately 1MP with up to four references. Completion time varies by task and load. See this page’s pricing details for current Max prices.
Black Forest Labs released FLUX.1 Kontext, including the [pro] and [max] models, on May 29, 2025. On APIMart you call them with flux-kontext-pro and flux-kontext-max.
You can pass up to four URLs in image_urls. The output and all reference images must stay within 9MP in total. Multiple references are experimental, and every URL must be publicly accessible.
Kontext outputs approximately 1MP, and resolution has no effect. width and height are rejected. Use size with one of the nine supported ratios or a WIDTHxHEIGHT pixel string; pixel strings are converted to the nearest supported ratio. Actual 16:9 and 9:16 outputs may differ from the requested ratio by about 4%.
Use output_format to select png, jpeg, or webp. seed is optional and random by default; reusing a fixed seed with the same inputs can help reproduce a result.
Use prompt_upsampling to control prompt enhancement. Set it to true to enable enhancement or explicitly set it to false to disable prompt rewriting. Review outputs when wording must remain strict.
Submit a generation request and poll the returned task_id until completed or failed. Failed tasks are refunded automatically. Reference URLs must be publicly reachable; hosts that block data-center traffic can cause fetching to fail, so use a reliable public URL.
The FLUX.1 Kontext Max API is billed per generated image. Original prices on APIMart (October 2026): FLUX.1 Kontext Max costs $0.08 per image, with no surcharge for aspect ratio or reference count. Gold members pay $0.064, and Platinum and Diamond members save up to 28%. Failed tasks are refunded, and the completed task's cost is the final charge.
Sign up for APIMart, open the API Keys page in your dashboard, and create a key. The same key works for the Black Forest Labs FLUX.1 Kontext Max API and every other model on the platform, with pay-as-you-go billing and no subscription.
Send your APIMart API key as a Bearer token and POST the request to /v1/images/generations with model set to flux-kontext-max, plus your prompt and optional image_urls. Read data[0].task_id from the response and poll /v1/tasks/{task_id} until the task is completed or failed. Full parameters and code examples for the Flux Kontext API are in the APIMart docs (docs.apimart.ai).
No. The FLUX.1 Kontext Max API has no free quota on APIMart. It is pay-as-you-go and billed per generated image, failed tasks are refunded automatically, and Gold members get 20% off, with Platinum and Diamond members saving up to 28%. See this page's live pricing table for current Kontext Max prices.
APIMart offers three Black Forest Labs model families with one API key. FLUX 3 Image (flux-3-image) and FLUX 3 Image Klein (flux-3-image-klein) generate and edit images with up to 10 references; FLUX.2 (flux-2-pro, flux-2-max and flux-2-flex) covers generation and editing with up to 8 references; FLUX.1 Kontext (flux-kontext-pro and flux-kontext-max) focuses on context-aware editing. All image models use POST /v1/images/generations, and FLUX 3 Video (flux-3-video) uses POST /v1/videos/generations.
Use FLUX.1 Kontext for quick context-aware edits at a fixed price per image: about 1 MP output and up to 4 references. FLUX.2 Pro, Max and Flex go up to 4 MP with up to 8 references and are priced by megapixels. FLUX 3 Image accepts up to 10 references and outputs up to 4K, priced by resolution. All three run on the same APIMart key; the comparison table on this page links to each model.
Explore more models in the same category.

Seedream 4.5
Seedream 4.5 API delivers cutting-edge text-to-image generation. Create 4K resolution images with precise text rendering, multi-reference style fusion, and unified editing capabilities.

Seedream 4.0
Seedream 4.0 API is text-to-image and image editing model. Generate 4K images with industry-leading text rendering, batch processing, and multi-reference support.

Flux 2 Pro
Flux 2 delivers state-of-the-art AI image generation and editing. Create photorealistic images from text with Flux 2 Pro, edit existing images with natural language using Flux 2 Flex, and maintain style consistency with multi-reference support.

Flux 2 Flex
Flux 2 delivers state-of-the-art AI image generation and editing. Create photorealistic images from text with Flux 2 Pro, edit existing images with natural language using Flux 2 Flex, and maintain style consistency with multi-reference support.