FLUX.2 [klein] 4B

AI Image Editing Model

Image $ · 0.1¢

Black Forest Labs' compact, open-source image generation model with sub-second inference, optimized for production and near real-time applications with multi-reference support

2048 x 2048
Max Resolution
Supported Modes
Text to Image Image Edit
Active

Details

Model ID
flux.2-klein-4b
Also known as: flux-2-klein-4b
Family
flux.2
Max Input Images
4
Tags
image-generation text-to-image image-editing open-weights
// Get Started

Ready to integrate?

Access flux.2-klein-4b via our unified API.

Create Account
Available at 2 providers

Starting from

$0.0010 /image via Replicate · +1 more

Prices shown are in USD · Some prices estimated from per-megapixel or per-token pricing

See all providers

Providers & Pricing (3)

FLUX.2 [klein] 4B is available from 3 providers, with per-image pricing starting at $0.001 through Replicate.

Replicate
Text to Image Image Edit
replicate/flux.2-klein-4b
Provider Model ID: black-forest-labs/flux-2-klein-4b
$0.0010 /input megapixel
fal.ai
Text to Image
fal/flux.2-klein-4b
Provider Model ID: fal-ai/flux-2/klein/4b
$0.0050 /megapixel
fal.ai
Image Edit
fal/flux.2-klein-4b-edit
Provider Model ID: fal-ai/flux-2/klein/4b/edit
$0.010 /input megapixel

flux-2-klein-4b API OpenAI-compatible

Base URL
https://api.lumenfall.ai/openai/v1
Model
flux.2-klein-4b

Code Examples

Text to Image

/v1/images/generations
curl -X POST \
  https://api.lumenfall.ai/openai/v1/images/generations \
  -H "Authorization: Bearer $LUMENFALL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux.2-klein-4b",
    "prompt": "",
    "size": "1024x1024"
  }'
# Response:
# { "created": 1234567890, "data": [{ "url": "https://...", "revised_prompt": "..." }] }

Image Edit

/v1/images/edits

Parameter Normalization

How we handle parameters across different providers

Not every provider speaks the same language. When you send a parameter, we handle it in one of four ways depending on what the model supports:

Behavior What happens Example
passthrough Sent as-is to the provider style, quality
renamed Same value, mapped to the field name the provider expects prompt
converted Transformed to the provider's native format size
emulated Works even if the provider has no concept of it n, response_format

Parameters we don't recognize pass straight through to the upstream API, so provider-specific options still work.

FLUX.2 [klein] 4B FAQ

How much does FLUX.2 [klein] 4B cost?

FLUX.2 [klein] 4B starts at $0.001 per image through Lumenfall. Pricing varies by provider. Lumenfall does not add any markup to provider pricing.

How do I use FLUX.2 [klein] 4B via API?

You can use FLUX.2 [klein] 4B through Lumenfall's OpenAI-compatible API. Send requests to the unified endpoint with model ID "flux.2-klein-4b". Code examples are available in Python, JavaScript, and cURL.

Which providers offer FLUX.2 [klein] 4B?

FLUX.2 [klein] 4B is available through fal.ai and Replicate on Lumenfall. Lumenfall automatically routes requests to the best available provider.

What is the maximum resolution for FLUX.2 [klein] 4B?

FLUX.2 [klein] 4B supports images up to 2048x2048 resolution.

Try FLUX.2 [klein] 4B in Playground

Generate images with custom prompts — no API key needed.

Open Playground