Text in, image out
Send a prompt and get back PNG, JPEG or WebP. On Windpaint it takes no input images; the prompt is the whole request.
image.generate
flux-2-klein-4b implements image.generate on Windpaint. The smallest FLUX.2 model, a 4-step distilled 4B text-to-image model. Open-source, Apache-2.0, from $0.005 per image.

flux-2-klein-4bimage.generateThe catalog describes it as “FLUX.2 [klein] 4B. 4-step distilled text to image.” Up to 4 images per request (num_outputs), PNG, JPEG or WebP.
Send a prompt and get back PNG, JPEG or WebP. On Windpaint it takes no input images; the prompt is the whole request.
image.generate
Set num_outputs from 1 to 4 for variations of one prompt. You pay per image delivered, not per request.
num_outputs
The same prompt, resolution, aspect ratio and seed give the same image, so you can change one setting and compare.
seed
Prices are fixed per output at the tier you ask for, and locked when you submit. One credit costs $0.05.
1kPrice per output. 1 credit = $0.05. Aspect ratio and output format don't change the price.
A request with num_outputs set costs the per-image price times the images delivered. If the model delivers fewer than you asked for, the rest of the hold is released.
Failed, refused and canceled jobs aren't charged. Pricing covers credits, top-ups and storage.
Submit to POST /v1/generation/capabilities/image.generate. A prompt. No input media. Anything outside these values returns 422.
| Field | Values | Default | Notes |
|---|---|---|---|
prompt | string | none | Required. Sent to the model as written. |
resolution | 1k | 1k | Sets the long edge: 1024 px. |
aspect_ratio | any of the ten | 1:1 | Sets the short edge from the long edge. |
num_outputs | 1 to 4 | 1 | Images in one job, billed per image delivered. |
seed | integer | random | Same seed and same request give the same image. |
output_format | png, jpeg, webp | png | Re-encoded on the server. |
output_quality | 1 to 100 | 90 | jpeg and webp only. |
preset | preset slug | none | Wraps your prompt in a Windpaint template. |
webhook_url | https URL | none | Signed POST when the job finishes. |
The tier sets the long edge and the aspect ratio sets the other, rounded to a multiple of 16. Portrait ratios swap the edges.
| Aspect ratio | 1k |
|---|---|
1:1 | 1024 × 1024 |
4:3 | 1024 × 768 |
3:4 | 768 × 1024 |
3:2 | 1024 × 688 |
2:3 | 688 × 1024 |
16:9 | 1024 × 576 |
9:16 | 576 × 1024 |
21:9 | 1024 × 432 |
4:5 | 816 × 1024 |
5:4 | 1024 × 816 |
Most images finish within a few seconds of being picked up, so you can send Prefer: wait and get the finished job back in the submit response instead of polling.
curl -X POST https://api.windpaint.ai/v1/generation/capabilities/image.generate \ -H "Authorization: Bearer $WINDPAINT_API_KEY" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d '{ "model": "flux-2-klein-4b", "prompt": "a ceramic teapot on a linen tablecloth, soft window light", "resolution": "1k", "aspect_ratio": "3:2", "seed": 7 }'curl -X POST https://api.windpaint.ai/v1/generation/models/flux-2-klein-4b \ -H "Authorization: Bearer $WINDPAINT_API_KEY" \ -H "Content-Type: application/json" \ -d '{"prompt": "a ceramic teapot on a linen tablecloth", "num_outputs": 4}'{ "id": "d77a4c1e-9b2f-4a3d-8e6f-7a8b9c0d1e2f", "url": "https://api.windpaint.ai/v1/generation/assets/d77a4c1e-.../content", "content_type": "image/png", "width": 1024, "height": 688, "duration_s": null}The submit returns 202 with a request_id and a status_url. Send an Idempotency-Key header so a retried submit returns the first job instead of billing a second. Each output is an asset in your project; its id can go straight into another job's inputs, for example as the start frame of a video.
Windpaint sends your prompt to the model as written. There's no prompt rewriting and no negative prompt field. Plan to try a few seeds.
BFL's FLUX.2 prompting guide says to put the most important elements early in the prompt.
There are no negative prompts. Describe the scene you want rather than what to leave out.
Put the words to render in quotes. The card notes rendered text may be inaccurate, so check the letters in the result.
The card notes that prompt following depends heavily on how the prompt is written, so try a few phrasings.
| Use | Prompt | Settings |
|---|---|---|
| Product shot | “A matte black ceramic coffee mug on a pale oak table, studio product photo, soft light from the left, plain light grey background, shallow depth of field” | 1k, 1:1 |
| Editorial photo | “A fisherman mending a green net on a wooden dock at dawn, low fog over the water, muted colors, 35mm film photo, natural light” | 1k, 3:2 |
| Illustration | “Flat vector illustration of a bicycle courier riding through a city at night, limited palette of navy, orange and cream, clean shapes, no outlines” | 1k, 4:5 |
From Black Forest Labs's own prompt tooling and examples. Their prompt enhancer isn't applied on Windpaint, but you can follow the same advice when you write the prompt.
A preset wraps your prompt in a Windpaint template and fills settings you leave out. Add "preset": "product-shot", or pin a version with @1. The price is the same as without one. Each swatch is a real output of its preset, with the subject that was sent.

Product shot on seamlessA matte mint-green ceramic pour-over coffee set

Cinematic stillTwo astronauts sharing a thermos on a dusty red ridge

Isometric illustrationA tiny rooftop greenhouse cafe

Anime key artA boy waiting at a rural bus stop in the rain beside a giant moss-covered stag spirit

Editorial portraitA ceramicist in her studio with clay on her hands

Flat vector illustrationA city park on a sunny Sunday

Overhead food photoA bowl of spicy miso ramen with soft eggs
Current limits on Windpaint, as the docs state them, then the ones the developer states for the model itself.
From the developer:
flux-2-klein-4b is an open-source model licensed Apache-2.0.
Windpaint runs it on our own GPUs. Your prompts and inputs aren't sent to a third-party model API to make these outputs, and Windpaint doesn't train on your prompts, inputs or outputs.
Outputs are stored as assets in your project for your organization's retention period, 7 days by default. See Trust for moderation, data use and retention.
Licence: Apache-2.0.
Yes. Apache-2.0 allows commercial use, including running the model behind a paid API, with no revenue or user caps. The 9B [klein] models and FLUX.2 [dev] are under BFL's non-commercial licence instead; only the 4B models are Apache-2.0.
This is our reading of the licence, not legal advice. Read the licence text before you rely on it.
Published by Black Forest Labs for running the weights yourself. These aren't Windpaint's figures: Windpaint runs flux-2-klein-4b on its own GPUs, so you don't need any of this to call it.
FLUX.2-klein-4b-fp8, FLUX.2-klein-4b-nvfp4, FLUX.2-klein-base-4b-fp8 and FLUX.2-klein-base-4b-nvfp4. The launch post says FP8 uses up to 40% less VRAM and NVFP4 up to 55% less, benchmarked on RTX 5080/5090 at 1024 × 1024. BFL blogpipe. enable_model_cpu_offload() to save VRAM. FLUX.2-klein-4B model cardWhat the developer's own code and examples use. On Windpaint, the tiers and aspect ratios in output sizes apply instead.
Steps, guidance and defaults from the developer's card and code. The Windpaint API doesn't take steps or guidance; these are for running the weights yourself.
num_inference_steps=4, guidance_scale=1.0, 1024 × 1024 (card example). FLUX.2-klein-4B model card0.1 credits ($0.005) per image at 1k. Aspect ratio and output format don't change the price. A request with num_outputs set costs the per-image price times the images delivered. The 200 signup credits cover 2,000 images at 1k.
Yes. FLUX.2 [klein] 4B's weights are licensed Apache-2.0, an OSI-approved open-source licence. Windpaint runs it on its own GPUs; your prompts and inputs are not sent to a third-party model API, and Windpaint does not train on them.
No. The price is held when you submit and captured only if the job completes. A failed, refused (nsfw) or canceled job releases the hold in full.
No. On Windpaint flux-2-klein-4b is text-to-image only and takes no input assets; sending inputs returns 422. Image editing is defined in the API as image.edit but has no model yet.
The model starts from noise the size of the output, so a different aspect ratio is a different starting point. Keep the ratio fixed while you work on the prompt.
The tier sets the long edge and the aspect ratio sets the other, rounded to a multiple of 16, so some sizes are slightly off the exact ratio. Crop afterwards if you need an exact size. POST /v1/generation/estimate returns width and height before you pay.
The model card says it fits in about 13GB of VRAM, on an NVIDIA RTX 3090/4070 or above. That's for running the weights yourself. On Windpaint the model runs on Windpaint's GPUs.
Yes. [klein] 4B and 4B Base are Apache-2.0. The 9B [klein] models are under BFL's non-commercial licence.
4B is Apache-2.0, while 9B is under BFL's non-commercial licence. BFL's README recommends 4B for consumer GPUs such as the RTX 3090/4070. Both are step-distilled, and BFL runs its distilled models at 4 steps.
The undistilled version of [klein] 4B. It runs 50 steps and is meant for fine-tuning and LoRA training. It's also Apache-2.0.
Yes. BFL released FP8 and NVFP4 versions of all [klein] variants, including FLUX.2-klein-4b-fp8 and FLUX.2-klein-4b-nvfp4 on Hugging Face.
BFL's FLUX.2 prompting guide is written for [pro] and [max], but it states rules for FLUX.2 in general. There are no negative prompts, so describe what you want, put the important elements first, and quote any text to render.
Request early access. We’ll email you when your account is approved, with 200 free credits to spend in the first 30 days.