Introduction
FLUX.2 [klein] 4B Text to image makes one image from a written prompt on Black Forest Labs' smallest FLUX.2 model, which is open source under Apache 2.0. Choose one of nine aspect ratios at about one megapixel (1k) or up to 2048 pixels on the long side (2k) and get a JPEG back in roughly 15 to 35 seconds. No content filter is applied to the prompt or the result.
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
Small and quick
With 4 billion parameters this is the lightest FLUX.2 model. It suits drafts, mockups and trying many ideas in a row.
Quoted text and hex colors
Short headlines in quotation marks and hex color codes are understood. Results are decent, not guaranteed: lettering can be misspelled and a color may show up on a different object than you intended.
Open, with no filter
Nothing is reviewed or refused. The limit is the model itself: it tends to add clothing on its own, and the Very strong level does not render.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | Describe subject, outfit, setting and light in full sentences, up to 5,000 characters. Put text for signs or posters in quotation marks and write colors as hex codes. at least 1 characters · at most 5000 characters |
aspect_ratio | No | Nine options from 21:9 to 9:21; the default is 1:1. The ratio does not change the price. |
resolution | No | Size tier: 1k is about one megapixel (default), 2k is 2048 pixels on the long side. Check the price shown before you run. |
seed | No | A number from 0 to 2147483647. Reuse it while you change one detail to compare results; try several seeds when text looks off. |
Pricing
Billed per image. The size tier you choose is reflected in the price shown before you run; aspect ratio does not change it. Failed requests are not charged.
| Specification | Price |
|---|---|
| $0.0093 / image |
| $0.0099 / image |
Use cases
Draft before you commit
Try a dozen prompts and seeds quickly, then take the best idea to a larger model if you need more detail.
Posters and neon scenes
Event posters, ad mockups and night scenes with signs and colored light work well within this model's range.
Moody portraits
Single subjects with one clear light source come out cleanly, especially with the hands covered or out of frame.
Prompt guide & pro tips
Describe the outfit yourself
This model adds clothing on its own. Write exactly what each person wears, piece by piece, and it will follow that.
Quote text, keep it short
One or two short words in quotes are safest. If lettering looks wrong, change only the seed and run again.
Keep hands simple with two people in frame
Hands are the first thing to fail with two people in frame. Put them on shoulders, on a railing or in gloves, or run several seeds and pick the best.
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/text-to-image",
"input": {
"prompt": "A ceramic teapot on a linen cloth, soft window light, muted palette",
"resolution": "1k",
"aspect_ratio": "1:1"
}
}'
# 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.

























