Models / Image / FLUX.1 Kontext [max] API
FLUX.1 Kontext [max] API
In-context image generation and editing model with fast iterative capabilities.

FLUX.1 Kontext [max] is currently available through Black Forest Labs' API.
We're working to bring this premium model to Together AI in the near future to provide our users with access to the complete FLUX.1 Kontext family.
FLUX.1 Kontext [max] API Usage
Endpoint
RUN INFERENCE
curl -X POST "https://api.together.xyz/v1/images/generations" \
-H "Authorization: Bearer $TOGETHER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "black-forest-labs/FLUX.1-kontext-max",
"prompt": "make the bird red and the background a desert",
"image_url": "https://cdn.sanity.io/images/gsvmb6gz/production/373431a80014dad2e2614b4e1b8936ff8753e62d-832x1248.png?fm=webp"
}'
JSON RESPONSE
RUN INFERENCE
from together import Together
client = Together()
imageCompletion = client.images.generate(
model="black-forest-labs/FLUX.1-kontext-max",
prompt="make the bird red and the background a desert",
image_url="https://cdn.sanity.io/images/gsvmb6gz/production/373431a80014dad2e2614b4e1b8936ff8753e62d-832x1248.png?fm=webp",
)
print(imageCompletion.data[0].url)
JSON RESPONSE
RUN INFERENCE
import Together from "together-ai";
const together = new Together();
const response = await together.images.create({
model: "black-forest-labs/FLUX.1-kontext-max",
prompt: "make the bird red and the background a desert",
image_url: "https://cdn.sanity.io/images/gsvmb6gz/production/373431a80014dad2e2614b4e1b8936ff8753e62d-832x1248.png?fm=webp"
});
console.log(response.data[0].b64_json);
JSON RESPONSE
Model Provider:
FLUX
Type:
Image
Variant:
[max]
Parameters:
Deployment:
✔ Serverless
Quantization
Context length:
Pricing:
$0.08
Run in playground
Deploy model
Quickstart docs
Quickstart docs
How to use FLUX.1 Kontext [max]
Model details
FLUX.1 Kontext [max] is a premium generative flow matching model that delivers maximum performance for in-context image generation and editing. It features enhanced prompt adherence, superior typography generation, and premium consistency for complex editing tasks.
The model processes both text and image inputs to enable character consistency, local editing, style reference, and iterative refinement workflows.
Designed for demanding applications requiring the highest quality outputs, precise prompt following, and consistent results across varied editing scenarios.
Prompting FLUX.1 Kontext [max]
Applications & Use Cases
Looking for production scale? Deploy on a dedicated endpoint
Deploy FLUX.1 Kontext [max] on a dedicated endpoint with custom hardware configuration, as many instances as you need, and auto-scaling.
