Diperbarui
What is the Flux.2 Klein 4B API?
The Flux.2 Klein 4B API is live on UnificAlly as black-forest-labs/flux.2-klein-4b, from $0.0112 per image. Flux.2 Klein 4B โ also searched as FLUX 2 Klein 4B or flux-2-klein-4b โ is the smallest variant in the Flux.2 Klein line, sitting at about 4 billion parameters. Its openly released weights are light enough to run on consumer hardware, and the same model is available here as a hosted API with no local setup. The control surface is the same as the larger Klein 9B: a prompt, seven aspect ratios (21:9, 16:9, 4:3, 1:1, 3:4, 9:16, 9:21), four resolution presets up to 4MP, optional image_urls for reference, and an integer seed for reproducibility. Klein models skip the guidance, steps, and prompt_upsampling knobs that Flex exposes, which keeps the call shape simple and the run time short. Use 4B when you need the cheapest, fastest path through the Flux.2 family for previews, large batches, and tight iteration loops.
Flux.2 Klein 4B API specs
| Model ID | black-forest-labs/flux.2-klein-4b |
| Endpoint | POST https://api.unifically.com/v1/tasks |
| Request types | Text-to-image, image generation with reference images |
| Output size | 0.6, 1, 2, or 4 megapixels |
| Aspect ratio | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, 9:21 |
| Reference inputs | Image URLs in image_urls |
| Controls | Seed |
| Rate at 0.6 MP | $0.0112 |
| Rate at 1 MP | $0.0112 |
| Rate at 2 MP | $0.012 |
| Rate at 4 MP | $0.0128 |
Billing is per image, with no subscription. Each reference image adds a per-image charge on top. The Flux.2 pricing guide and the pricing page show the live rate table.
How to use the Flux.2 Klein 4B API
- Create an API key on the API keys page.
- Send a POST request to
/v1/taskswith the model ID and aninputobject. - Read the
task_idfrom the response, then check the task until it is finished, or pass a callback URL and wait for the result.
curl -X POST https://api.unifically.com/v1/tasks \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "black-forest-labs/flux.2-klein-4b",
"input": {
"prompt": "A simple icon of a coffee cup",
"aspect_ratio": "1:1"
}
}'
The Flux.2 Klein 4B API returns the task ID straight away:
{
"code": 200,
"success": true,
"data": {
"task_id": "abc123def456",
"status": "processing"
}
}
Poll the task, or set a callback_url on the request. The finished task carries the image URL.
curl https://api.unifically.com/v1/tasks/{task_id} \
-H "Authorization: Bearer YOUR_API_KEY"
Flux.2 Klein 4B API parameters
| Parameter | Type | Default | What it does |
|---|---|---|---|
prompt | string | required | Text description of the image |
aspect_ratio | string | 16:9 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, or 9:21 |
resolution | string | 1mp | 0.6mp, 1mp, 2mp, or 4mp |
image_urls | string[] | none | Reference image URLs |
seed | integer | random | Seed for reproducible results |
nsfw_check | boolean | false | Checks the prompt and input images for NSFW content before generating. Off unless set to true |
Klein models do not support guidance, steps, or prompt_upsampling. The Flux.2 Klein 4B API documentation has the full reference.
Key features of Flux.2 Klein 4B
Five features cover what you'll touch in a real production run.
Smallest, fastest Flux.2 variant
About 4 billion parameters. Same prompt and reference surface as Klein 9B with shorter runtime, which makes it the right pick for live previews, design tools, and bulk drafts.
Seven aspect ratios on one model
21:9, 16:9, 4:3, 1:1, 3:4, 9:16, and 9:21. Cover the same brief horizontally, vertically, and squarely without re-prompting per platform. Default is 16:9.
Four resolution presets up to 4MP
0.6mp, 1mp, 2mp, 4mp. Pick low-MP for grids and thumbnails, 4mp for final delivery files. The same prompt scales across presets without changing.
Reference image support
Pass one or more URLs as image_urls and the model uses them as guidance. Useful for keeping product geometry, character continuity, or a palette consistent across runs.
Reproducible output via seed
Pass an integer seed and the same prompt, references, aspect ratio, and resolution return the same image. Useful for regression tests and locking a result you want to keep.
What Flux.2 Klein 4B is best for
Real-time previews
Fastest turnaround in the Flux.2 family. Good for design tools, live editors, and any UI where the user is waiting on the next render.
Thumbnail grids
Run the same prompt at 0.6mp or 1mp across multiple seeds for a grid of candidates. Pick a winner, re-render at 4mp on a heavier variant when needed.
Bulk preview generation
High-throughput placeholder imagery for design tools, CMS uploads, and prototype catalogues.
Cross-platform social sets
Seven aspect ratios on one model means a brand prompt rendered at 9:16, 1:1, and 16:9 lands as a matched set in a single batch.
Locked iteration loops
Pair with a fixed seed to A/B prompts one variable at a time without losing the rest of the look.
Reference-anchored drafts
Pass product or character references and run a fast Klein 4B draft pass before spending money on a slower Flex or Pro render.
Flux.2 Klein 4B use cases
Wire Klein 4B into a design tool's live preview pane: the user types, the API returns a 1MP draft in seconds, and the editor shows it inline. Run a thumbnail grid by sending one prompt across six seeds at 0.6mp and presenting the matrix to a reviewer. Stand up a placeholder generator for a CMS so editorial teams have brand-consistent imagery the moment a draft post is created. Lock a winning seed and run the same prompt at 9:16, 1:1, and 16:9 for a multi-platform social set in a single batch.
FAQ
Pertanyaan yang sering diajukan tentang Flux.2 Klein 4B
Flux.2 Klein 4B is the smallest variant in the Flux.2 Klein line, with about 4 billion parameters. It produces images from a prompt at one of seven aspect ratios and four resolution presets, with optional reference images and a reproducible seed. The trade-off is shorter runtime in exchange for less headroom on fine detail.
Once you have an account, create a key on the API keys page and pass it as Authorization: Bearer <key> on requests to https://api.unifically.com/v1/tasks. A first Klein 4B call needs nothing more than the model ID black-forest-labs/flux.2-klein-4b and a prompt, and each image is paid from your prepaid balance.
POST to /v1/tasks with model set to black-forest-labs/flux.2-klein-4b and an input holding a required prompt plus optional aspect_ratio (default 16:9), resolution (default 1mp), image_urls and seed. Generation is asynchronous: the reply carries a task_id, and GET /v1/tasks/{task_id} or a callback_url hands back the finished image URL.
Five. prompt, aspect_ratio (21:9, 16:9, 4:3, 1:1, 3:4, 9:16, 9:21), resolution (0.6mp, 1mp, 2mp, 4mp), optional image_urls for reference, and an optional integer seed. Klein models do not expose Flux's guidance, steps, or prompt_upsampling knobs.
Seven. 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, and 9:21. The default is 16:9. Useful for cross-platform sets where the same prompt has to render horizontally, vertically, and squarely.
Four. 0.6 megapixels, 1 megapixel (default), 2 megapixels, and 4 megapixels. Pick smaller resolutions for grids and thumbnails; pick 4MP for hero crops and final delivery.
Yes. Set image_urls to one or more URLs and the model uses them to guide the output. Useful for product geometry, character continuity, or palette anchoring across runs.
Yes. Pass an integer seed alongside the prompt. Re-sending the same prompt, references, aspect ratio, resolution, and seed returns the same image.
When fine detail at 2MP or 4MP matters more than the latency saving, or when the prompt covers a complex multi-element scene where extra capacity helps.
Panduan dan perbandingan Flux.2 Klein 4B
Tinjau harga, batasan, dan hasil pengujian sebelum menjalankan model ini.
Model yang mirip dengan Flux.2 Klein 4B
Jelajahi semua model
API FLUX 3 Image
Bounding-box layouts and edits, up to 10 references, 15 aspect ratios plus auto, 768sq to 4K.
- Teks ke Gambar
- Gambar ke Gambar

API FLUX 3 Image Klein
5.6B open weights, text-to-image, editing, up to 4 references, 7 aspect ratios to 4 MP, 16 steps.
- Teks ke Gambar
- Gambar ke Gambar

API Flux.2 Pro
Balanced production runs, 7 aspect ratios, 0.6-4 MP, up to 10 reference images.
- Teks ke Gambar
- Gambar ke Gambar

API Flux.2 Flex
Steps, guidance, seed, and prompt upsampling controls, 7 aspect ratios up to 4 MP.
- Teks ke Gambar
- Gambar ke Gambar
