Models / Black Forest Labs
FLUX.2 klein 4B
by Black Forest Labs
Makes pictures from a written prompt.
FLUX.2 klein 4B turns a written prompt into a picture. It is made by Black Forest Labs. On Tīrtha it makes one image per call.
Price per image
The live price, read from billing as this page loads. You pay for each image returned, from prepaid credit. There is no charge for the prompt. Requests that fail are not charged.
Live price not available just now.
tirtha/flux-2-klein-4bGood at
- Fast picturesThe maker built it as its fastest image family, for interactive and latency-critical apps.
- Small and openA 4 billion parameter model with open weights for commercial use under Apache-2.0.
- Text to imageWrites a picture from a text prompt. On Tīrtha it takes text in only.
Model card details
- Made by
- Black Forest Labs
- Kind
- Text to image
- Licence
- Apache-2.0
- Listed on Hugging Face
- Jan 14, 2026
- Parameters
- 4 billion
- Type
- Rectified flow transformer
- Maker's use cases
- Interactive workflows, production, latency-critical apps
What it makes
Made with FLUX.2 klein 4B. Real outputs, not edited, each with the exact prompt that made it (made at 1024x1024, saved as JPEG for the web).

An old lighthouse on black volcanic rocks at blue hour, waves crashing, misty long exposure.AI-generated

A paper boat drifting down a rain-filled gutter, soft morning light, watercolor.AI-generated

A tidy workbench with brass gears, a magnifying lamp and a sleeping orange cat.AI-generated
Open weights, Apache-2.0 licence. Maker facts from Black Forest Labs's model card on Hugging Face (huggingface.co/black-forest-labs/FLUX.2-klein-4B). Limits are the ones Tīrtha enforces today.
Request and response
Fields you send
| Field | Required | Values |
|---|---|---|
model | yes | tirtha/flux-2-klein-4b |
prompt | yes | Text, 1 to 2,000 characters. |
n | no | Images to make. This model makes 1 per call, which is the default. |
size | no | 1024x1024. Default 1024x1024. |
response_format | no | b64_json only, which is the default. |
Any other field is refused with unknown_parameter, so a typo never passes silently.
What comes back
HTTP/1.1 200 OK
Content-Type: application/json
{
"created": 1762992000,
"data": [
{"b64_json": "<the image, base64>"}
],
"model": "tirtha/flux-2-klein-4b",
"usage": {
"images": 1,
"charged": "<US dollars, 6 decimals>",
"estimated": false
}
}One data entry per image returned, each a base64 image. There is never a link to fetch. usage.images is what you are billed for.
If something goes wrong
Errors come back as JSON: {"error": {"code", "message", "type"}}. A call that fails is not charged.
| HTTP | Code | What it means |
|---|---|---|
| 400 | invalid_prompt | The prompt is empty or too long. |
| 400 | invalid_n | n is outside the range above. |
| 400 | invalid_size | The size is not one this model makes. |
| 400 | invalid_response_format | Anything other than b64_json. |
| 400 | unknown_parameter | A field the API does not take. Send only the fields above. |
| 400 | invalid_request | The body is not a JSON object. |
| 400 | content_policy | Refused by content policy. Nothing was charged. |
| 400 | request_rejected | The request was rejected. Nothing was charged. |
| 402 | billing_required | This needs a prepaid credit account. Add credits in your dashboard first. |
| 402 | insufficient_credits | Not enough prepaid credit for this request. The message says how much it may need. |
| 404 | model_not_found | The model id is wrong, or is not this kind of model. |
| 404 | model_not_priced | This model is not available yet. |
| 429 | media_busy | This model is busy right now. Retry in a few seconds. Nothing was charged. |
| 503 | billing_unavailable | Billing is temporarily unavailable. Please retry. |
| 503 | unavailable | Temporarily unavailable. Nothing was charged. |
What a job costs
100 pictures cost about -
Worked out from the live price above. You pay only for images returned.
How to use it
Pick it when you want quick pictures from a prompt in an app where people wait for the result.
Model id tirtha/flux-2-klein-4b · POST https://api.tirtha.ai/v1/images/generations
- Write the prompt in this order: the subject, where it is, the style, then the light and framing. For example
a red lighthouse, rocky coast at sunrise, soft watercolour, wide shot. You have up to 2,000 characters. - Each call makes one picture. For several takes on one idea, make several calls and keep the best. You pay for each image returned, and a failed call costs nothing.
- Every picture is 1024x1024. Crop or resize it on your side for other shapes.
- Pictures come back inside the response as base64. Decode the text and save the bytes. The first bytes tell you the file type (PNG, JPEG or WebP); the examples check them. There is no link to fetch and nothing expires.
- There is no seed or style field: to get a different picture, change the wording of the prompt.
Set TIRTHA_API_KEY to a key from your dashboard first. Keys, credits and the base URL: Quickstart.