What is Flux Kontext Pro API?
FLUX.1 Kontext Pro generates images from text with advanced contextual understanding for consistent character and style.
Technical Specifications
- Supported inputs: Image, Text
- Output: Image
- Endpoint: /images/generations
Performance Benchmarks
[embed]
Flux Kontext Pro API Pricing
- Pricing on request
Where to Use Flux Kontext Pro
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]
Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.
Targeted local edits on existing images, including precise regional changes and more complex transformations of whole scenes.
Generating images from text prompts, with strong prompt adherence and image generation quality described as part of the model’s unified text-to-image and editing workflow.
Maintaining character, identity, and style consistency across iterative editing turns and across different scenes.
Editing text within images, such as signs, posters, and labels, while preserving the original styling and context.
import requests r = requests.post( "https://api.aimlapi.com/v1/images/generations", headers={"Authorization": "Bearer " + AIMLAPI_KEY}, json={ "model": "flux-pro/kontext", "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", "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","prompt":"A cat holding a sign that says hello"}'
OpenAI-compatible — swap the base URL and it works with your existing SDK.
| Type | Price |
|---|---|
| Output | |
| Model | Input | Output | Context | Best for |
|---|---|---|---|---|
Flux Kontext Pro This page | Image generation at scale | |||
| Image generation at scale | ||||
| Image generation at scale | ||||
| Image generation at scale | ||||
| Image generation at scale |
Flux Kontext Pro takes image, text as input and returns image.
Flux Kontext Pro is priced at $0.052 / gen (variable).
Flux Kontext Pro is billed per generation — a fixed charge per output rather than by prompt length.
Yes, Flux Kontext Pro accepts image input as well as a text prompt.
Flux Kontext Pro was built by Black Forest Labs.
Send a request to https://api.aimlapi.com/v1/images/generations with flux-pro/kontext as the model id.
Yes. Flux Kontext Pro is served through AI/ML API, so the same key and endpoint format used for other models applies.