Introduction
FLUX.1 Kontext [pro] Edit takes one photo and a written instruction and returns the same photo with that instruction carried out. Black Forest Labs released Kontext on 29 May 2025 as a model that edits in context: it reads the picture you send rather than redrawing a scene from scratch, so faces, poses, rooms and lettering survive edits that would make a text-to-image model start over.
Choose a mode by starting material
| What you have | Mode |
|---|---|
| one photo you want to change | FLUX.1 Kontext [pro] Edit |
| only a written scene | FLUX.1 Kontext [pro] Text to image |
Key features & highlights
Local changes, the rest left alone
Our vanity test swapped a champagne satin slip for black lace. The face, the hair, the bulb lights and the lipstick lettering on the mirror stayed where they were.
Weather, time and light on the same frame
The motel pool went from dusk to a rainy night: rain on the water, the neon reflected in wet tiles, the shirt soaked through, the man's face and pose unchanged.
Signs and lettering survive the edit
Text already in the photo is kept unless you ask to change it, and new text can be added in quotes.
Keeps your shape, or sets a new one
Leave the aspect ratio on auto and the result follows the source: a 1344x768 photo came back at 1328x752 and a square at 992x992. Pick a ratio to crop or extend instead.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | Required, up to 5,000 characters. Lead with the change, then name what must stay: face, hair, pose, background, existing lettering. at least 1 characters · at most 5000 characters |
image_url | Yes | Required. One JPEG, PNG or WebP photo up to 10 MB. at least 1 characters |
aspect_ratio | No | auto (default) keeps the shape of the source photo. Choose 1:1, 16:9, 9:16, 4:3, 3:4 or 21:9 to crop or extend the frame. |
output_format | No | jpeg (default) or png. The format does not change the price. |
enable_prompt_expansion | No | Off by default. When on, the instruction is expanded with extra detail before editing; keep it off when the wording of the edit must stay exact. Default: |
Pricing
$0.028 / image
Kontext [pro] edits are billed per image, the same as text to image, whatever the source size or shape. Refused and failed requests are not charged.
Use cases
Outfit and styling passes
One portrait, several looks: satin, lace, a blazer, a robe, each as its own edit from the same source.
Mood and lighting variants
Day to night, dry to rain, warm to cold, without losing the person in the frame.
Continuity for a series
Feed each result back in as the next source to move a character through a sequence of small, controlled changes.
Fixing a detail
Change the wording of a sign, remove an object, recolour a garment.
Prompt guide & pro tips
Start with the change, then the anchors
"Change her slip into black lace" first, then "Keep her face, hair, pose and the mirror text exactly the same."
Name things by what they look like
Say "the champagne satin slip" rather than "her clothes"; the model finds the region by your description.
One change per pass
Several small edits in a row hold identity better than one long instruction that rewrites everything.
Use auto for the source shape
Only set a ratio when you want the frame cropped or extended.
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "black-forest-labs/flux-1-kontext-pro/edit",
"input": {
"aspect_ratio": "auto",
"image_url": "https://example.com/reference.png",
"output_format": "jpeg",
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.


























