We use cookies. Cookies and browser storage keep you signed in and remember your preferences. With your permission we also measure how the site is used. You can any time. See our cookie policy.
Black Forest Labs: FLUX.2 Klein 4B
black-forest-labs/flux.2-klein-4bTry Black Forest Labs: FLUX.2 Klein 4B now
Runs on your balance at the prices above. New accounts start with free usage.
Settings
Black Forest Labs: FLUX.2 Klein 4B at a glance
- Context window of 40,960 tokens, enough for long documents and multi-turn conversations.
About Black Forest Labs: FLUX.2 Klein 4B
FLUX.2 Klein 4B is an image generation model from Black Forest Labs, released on 14 January 2026. It sits in the FLUX.2 family as the smallest and fastest member, built for high throughput work rather than maximum fidelity. Black Forest Labs positions it as the entry point to the family, so if you have used other FLUX.2 models, the request shape and behaviour will feel familiar.
The model takes text and image inputs and returns images. Its context window is 40,960 tokens, with a maximum output of 36,864. Image inputs are handled through input references, and you can supply up to four of them, which allows text plus reference images in a single request. Output is always an image, never text. The supported parameters list is short: seed is the only sampling parameter exposed, and it is a boolean rather than a numeric value. Image specific options cover aspect ratio (1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, or auto), output format (png or jpeg), and n, which is fixed at exactly one image per request.
Those capabilities point to a fairly specific set of uses. Text to image generation covers the straightforward case: product shots, blog illustrations, concept art, placeholder assets for a UI. Because the model accepts up to four reference images, it also suits image to image work such as style transfer, variations on an existing asset, or guided edits where you want the output to follow a supplied composition or subject. The aspect ratio enum makes it practical for social formats, since you can request 9:16 for vertical video thumbnails or 21:9 for banners without post processing crops. The seed parameter lets you reproduce a generation when you need a stable result across runs.
You call it through api14's OpenAI-compatible API using the model id black-forest-labs/flux.2-klein-4b. Because the interface follows the OpenAI convention, existing clients and SDKs work with minimal changes. Send your prompt as text, attach reference images if you need them, and set the image options in the request. The parameters the model supports are seed, aspect ratio, output format, n, and input references. Note that n accepts only the value 1, so batch generation means multiple requests rather than a single call with a higher count.
The main constraint to weigh is scope. This is a text and image in, image out model, so it will not help with chat, classification, or any task that expects a text response. If you need higher image quality and can accept slower generation, a larger FLUX.2 variant is the better fit. If you need many images quickly and the quality bar is moderate, Klein 4B is the one to reach for.
How to call the Black Forest Labs: FLUX.2 Klein 4B API
- Create an API key in your dashboard.
- Install the official openai SDK for your language.
- Set baseURL to https://api14.com/api/v1 and model to "black-forest-labs/flux.2-klein-4b".
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api14.com/api/v1",
apiKey: process.env.API14_API_KEY,
});
const result = await client.images.generate({
"model": "black-forest-labs/flux.2-klein-4b",
"prompt": "A minimalist product photo of a ceramic mug on a wooden table",
"n": 1,
"aspect_ratio": "1:1"
});
import { writeFile } from "node:fs/promises";
await writeFile("image.png", Buffer.from(result.data[0].b64_json, "base64"));
Supported parameters
seedSpecifications
- Context length
- 40,960
- Max output
- 36,864
- Input
- text, image
- Output
- image
Requests on api14 · last 7 days
Black Forest Labs: FLUX.2 Klein 4B: frequently asked questions
- How much does the Black Forest Labs: FLUX.2 Klein 4B API cost?
- Black Forest Labs: FLUX.2 Klein 4B costs Image output $0.05 / megapixel. It is charged from your USD balance only for successful requests; failed requests are free.
- What is the context window of Black Forest Labs: FLUX.2 Klein 4B?
- Black Forest Labs: FLUX.2 Klein 4B reads up to 40,960 tokens per request: prompt, history and documents together. It writes up to 36,864 output tokens per response.
- What can Black Forest Labs: FLUX.2 Klein 4B do?
- Black Forest Labs: FLUX.2 Klein 4B accepts text, image and returns image.
- How do I call Black Forest Labs: FLUX.2 Klein 4B from my code?
- Point any OpenAI SDK at https://api14.com/api/v1 and set the model to "black-forest-labs/flux.2-klein-4b". No other code changes. Copy a ready example from the code panel on this page.
- What are alternatives to Black Forest Labs: FLUX.2 Klein 4B?
- Comparable Image models at a similar price: ByteDance Seed: Seedream 5.0 Flash, Qwen: Qwen Image 2.1 Turbo, Sourceful: Riverflow V2.5 Fast. Each runs through the same API key, so switching is one string.
Black Forest Labs: FLUX.2 Klein 4B community
New topicThis community has no topics yet. Open the first one about Black Forest Labs: FLUX.2 Klein 4B.