Models / Black Forest LabsFLUX / / FLUX.1 Kontext [dev] API
FLUX.1 Kontext [dev] API
Image
In-context image generation and editing model using both text and image inputs.
Try our FLUX.1 Kontext API
New
FLUX.1 Kontext [dev] API Usage
Endpoint
black-forest-labs/FLUX.1-kontext-dev
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-dev",
"prompt": "",
"image_url": "<image_url>"
}'
RUN INFERENCE
from together import Together
client = Together()
response = client.images.generate(
prompt="",
model="black-forest-labs/FLUX.1-kontext-dev",
image_url="<image_url>"
)
print(response.data[0].b64_json)
RUN INFERENCE
import Together from "together-ai";
const together = new Together();
const response = await together.images.create({
model: "black-forest-labs/FLUX.1-kontext-dev",
prompt: "",
image_url: "<image_url>"
});
console.log(response.data[0].b64_json);
How to use FLUX.1 Kontext [dev]
Model details
FLUX.1 Kontext [dev] is a generative flow matching model for in-context image generation and editing. Unlike traditional text-to-image models, it allows you to prompt with both text and images to maintain character consistency, perform local edits, apply style references, and iterate step-by-step without fine-tuning.