Introduction
FLUX.2 [klein] 4B Image edit changes or combines up to three source images with a written instruction, on Black Forest Labs' smallest FLUX.2 model, which is open source under Apache 2.0. Keep the shape of your first image with auto, or choose a ratio and a 1k or 2k size tier. Each edit is one flat price per image, and no content filter is applied.
Choose a mode by starting material
| What you have | Mode |
|---|---|
| a written description | FLUX.2 Klein 4B Text to image |
| one to three pictures to change or combine | FLUX.2 Klein 4B Image edit |
Key features & highlights
Up to three references
Combine two portraits and a location, or restyle a single photo. The price does not change with the number of sources.
Edits that keep people
Ask for a new background, light or weather and keep faces, clothes and pose. With one source this works cleanly; with three, faces can drift slightly.
Open, with no filter
Nothing is reviewed or refused. In our tests edits kept an unfiltered source as it was; only the Very strong level came back toned down.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | Say what should change and what must stay the same, up to 5,000 characters. With several sources, refer to them as image 1, image 2 and image 3. at least 1 characters · at most 5000 characters |
image_urls | Yes | One to three source images, up to 10 MB each, in the order your prompt refers to them. Required. at least 1 items · at most 3 items |
aspect_ratio | No | Auto (default) keeps the shape of the first source at about one megapixel. Or pick one of nine ratios from 21:9 to 9:21. |
resolution | No | 1k (default) or 2k, which is 2048 pixels on the long side. It only applies when you choose a ratio; with auto the size is about one megapixel. |
seed | No | A number from 0 to 2147483647. Reuse it to compare edits while you change one detail of the prompt. |
Pricing
$0.013 / image
Billed per image at one flat price, whatever the number of source images or the size tier. Failed requests are not charged.
Use cases
Background and mood swaps
Move a couple from a sunny street to a rainy neon night in one pass.
Bringing people to a place
Place two portraits in a location photo for storyboards, covers and character sheets.
Quick restyles
Change light, season or palette while the composition stays put.
Prompt guide & pro tips
Protect first, change second
Open with what must remain the same, then describe only the change. Short, concrete instructions work best.
Give each source a role
With several images, say what each one contributes: this person, that person, this place.
Check the details
With two or three sources, look at hands, hair and accessories; a small extra item can appear. Run another seed if something is off.
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-2-klein-4b/edit",
"input": {
"aspect_ratio": "auto",
"image_urls": [
"https://example.com/reference.png"
],
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"resolution": "1k"
}
}'
# 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.

























