APIMart
FLUX.1 Kontext Max model icon
Image

FLUX.1 Kontext Max API

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.

Context-Aware EditingText to ImageFixed Per-Image Pricing

Service Highlights

  • Official Discounts
  • Pay-as-you-go
  • Fast & Low Latency
Input
2
Output
Generated 1

Image link valid for 72 hours

FLUX.1 Kontext Max API Pricing

Transparent pricing with no hidden fees. Pay only for what you use.

VariantGoldCurrent pricePlatinumDiamondOfficialYour savings
flux-kontext-max0.64Credits(~$0.064)/pic0.608Credits(~$0.0608)/pic0.576Credits(~$0.0576)/pic0.8Credits(~$0.08)/pic20%

* Actual costs are subject to final output.

FLUX.1 Kontext Max API Example: Text to Image and Image Editing

Call flux-kontext-max with one POST request. Generation is asynchronous: submit a task, then poll the task endpoint for the image URL.

  1. 1

    Authenticate FLUX.1 Kontext Max API requests

    Save your APIMart key in the APIMART_API_KEY environment variable and send it as Authorization: Bearer <key> on every request.

  2. 2

    Submit a FLUX.1 Kontext Max task

    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.

  3. 3

    Get the FLUX.1 Kontext Max result

    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.

POST /v1/images/generations
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"
  }'

FLUX.1 Kontext Max API Parameters

ParameterTypeRequiredDefaultDescription
modelstringRequiredDefault: flux-kontext-maxUse flux-kontext-max.
promptstringRequiredDefault: —Describe the image to create, or the edit to apply to the reference images.
image_urlsstring[]OptionalDefault: —Up to 4 reference images as public URLs or Base64. Omit for text-to-image.
sizestringOptionalDefault: 1:11: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_formatstringOptionalDefault: pngpng, jpeg or webp.
seedintegerOptionalDefault: —Reuse the same seed and inputs to help reproduce a result; omit for a random seed.
prompt_upsamplingbooleanOptionalDefault: falseLet the model expand and rewrite the prompt before generation.
safety_toleranceintegerOptionalDefault: 20 (strictest) to 6.
nsfw_checkbooleanOptionalDefault: falseReview the prompt and input images with omni-moderation-latest before submission.

Compare FLUX API Models on APIMart

One APIMart API key calls every FLUX model below. Image models are billed per image and FLUX 3 Video per second of video.

ModelBest forOutput
FLUX 3 Image APIThe FLUX 3 API for images: generation and editing with up to 10 references, search grounding and output up to 4K768sq to 4K (about 16 MP)
FLUX 3 Image Klein APILower-cost FLUX 3 images with seed, 1–16 steps and PNG or JPEG output768sq to 4K (about 16 MP)
FLUX 3 Video APIText to video, 1–10 keyframes, video continuation and drafts, with synced audioHD or FHD, 5–20 s
FLUX.2 APIChoosing between FLUX.2 Pro, Max and Flex on one page1–4 MP
FLUX.2 Pro APIBalanced quality and cost for production images, up to 8 references1–4 MP
FLUX.2 Max APIThe highest-quality FLUX.2 output, up to 8 references1–4 MP
FLUX.2 Flex APIAdjustable steps and guidance for typography and layout-heavy designs1–4 MP
FLUX.1 Kontext APIChoosing between FLUX.1 Kontext Pro and Max on one pageAbout 1 MP
FLUX.1 Kontext Pro APIContext-aware edits at a fixed price per image, up to 4 referencesAbout 1 MP
FLUX.1 Kontext Max APIThis pageHigher-quality Kontext edits with stronger prompt adherenceAbout 1 MP