About FLUX.2 Klein 4B
FLUX.2 Klein 4B edit takes a prompt and one to three image_urls, typically in about 31 seconds.
Call it with the model name black-forest-labs/flux-2-klein-4b/edit on POST /jobs/createTask, from $0.0126.
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.
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
Up to three references
Combine two portraits and a location, or restyle a single photo.
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.
Request parameters
| Parameter | Required | Description |
|---|---|---|
aspect_ratio | No | The shape of the frame: wide, square or tall. auto · 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 21:9 · 9:21 · Default: auto |
image_urls | Yes | Photos to edit or combine. Say in the prompt what each one adds. |
prompt | Yes | Describe what you want to make. |
resolution | No | Choose an available output size. 1k · 2k · Default: 1k |
seed | No | Use the same seed and settings for more controlled comparisons. ≥ 0 · ≤ 2147483647 |
Pricing
Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
| Option | USD per image |
|---|---|
| Standard | $0.0126 |
Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.
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
Call the FLUX.2 Klein 4B API in three steps
- Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls are billed in USD from your PopNow balance.
- Send the request. POST /jobs/createTask with model black-forest-labs/flux-2-klein-4b/edit and an input object that follows the parameter table. The response returns a task ID straight away.
- Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "black-forest-labs/flux-2-klein-4b/edit",
"input": {
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"image_urls": [
"https://media.popnow.ai/influencer/examples/marco.webp"
],
"aspect_ratio": "auto",
"resolution": "1k"
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.
About the FLUX.2 Klein 4B Edit Image endpoint
Its strongest use is changing the setting behind people: a sunny street becomes a rainy neon night while faces, clothes and pose stay.
Two portraits and a place can also be merged into one scene, with faces staying close to the sources.
List everything that must stay before the change; small models need the explicit keep list.
Text and exact colours are unreliable, so avoid edits that depend on them.
Seed is supported, so try three or four seeds for an edit and pick the cleanest result. Each variation is a separate paid request.
Output stays within about 2048 pixels on the long side; aspect_ratio can be set explicitly or left to follow the first reference.
A neon night swap works best when the prompt names the new light sources, such as a red sign overhead and wet reflections on the pavement.
For merged scenes, describe where each person stands, for example side by side on a beach cabin porch at sunset, so the small model places them sensibly.
Faces stay closest to the source when the input portraits are front-facing and evenly lit.
Examples

FLUX.2 Klein 4B API questions
How much does the FLUX.2 Klein 4B API cost?
FLUX.2 Klein 4B starts at $0.0126 per image with Edit Image, its lowest-priced task. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.
What are the limits of the FLUX.2 Klein 4B · Edit Image API?
Resolutions: 1K · 2K; Aspect ratios: auto · 1:1 · 16:9 · 9:16 · 4:3 · 3:4 +4; Reference images: 3; Prompt length (characters): 5,000; Largest upload: 10 MB. Requests outside these limits are rejected before anything is charged.
More about FLUX.2 Klein 4B
- Endpoints
- FLUX.2 Klein 4B · Create Image