Flux Kontext Pro overview
Flux Kontext Pro specs
- Model ID
flux-pro/kontext- Developer
- Black Forest Labs
- Input
- Image, Text
- Output
- Image
- Endpoint
POST https://api.aimlapi.com/v1/images/generations
FLUX.1 Kontext Pro generates images from text with advanced contextual understanding for consistent character and style.
Flux Kontext Pro API Pricing
- Pricing on request
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.
Use cases
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.
Flux Kontext Pro API pricing
| Usage | Price | Unit |
|---|---|---|
| Image generation | $0.04 | per generation |
The final price depends on request parameters such as resolution or duration.
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Flux Kontext Pro vs other image models: prices
AI/ML API rates for 5 models, per generation.
| Model | Per generation |
|---|---|
| $0.04 | |
| $0.025 | |
| $0.04 | |
| $0.04 | |
| $0.04 |
How to use the Flux Kontext Pro API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl 'https://api.aimlapi.com/v1/images/generations' \
-H "Authorization: Bearer $AIMLAPI_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "flux-pro/kontext",
"prompt": "A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo.",
"image_url": "https://example.com/input.jpg"
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "flux-pro/kontext",
"prompt": "A ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo.",
"image_url": "https://example.com/input.jpg"
}
response = requests.post("https://api.aimlapi.com/v1/images/generations", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = 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 ginger cat asleep on a stack of exactly three hardcover books in a rainy bookshop window at dusk. Gold lettering on the glass reads OPEN LATE. Warm lamp light inside, raindrops and blurred neon reflections outside, 35mm film photo.",
"image_url": "https://example.com/input.jpg"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Flux Kontext Pro FAQ
What inputs and outputs does Flux Kontext Pro support?
Flux Kontext Pro takes image, text as input and returns image.
How much does Flux Kontext Pro cost?
Flux Kontext Pro costs $0.04 per generation on AI/ML API, billed as you go with no subscription.
How is Flux Kontext Pro billed?
Flux Kontext Pro is billed per generation, a fixed charge per output rather than by prompt length.
Can Flux Kontext Pro take an existing image as input?
Yes, Flux Kontext Pro accepts image input as well as a text prompt.
Who created Flux Kontext Pro?
Flux Kontext Pro was built by Black Forest Labs.
How do I call Flux Kontext Pro on AI/ML API?
Send a request to https://api.aimlapi.com/v1/images/generations with flux-pro/kontext as the model id.
Is Flux Kontext Pro available through a single API key?
Yes. Flux Kontext Pro is served through AI/ML API, so the same key and endpoint format used for other models applies.
What is the Flux Kontext Pro model ID?
Use flux-pro/kontext as the model parameter. Requests go to https://api.aimlapi.com/v1/images/generations with your AI/ML API key.



.webp)