FLUX.2 Klein β€” hosted API access

This repository is not the model weights β€” it documents running FLUX.2 Klein through a hosted API on apimodels.app, a multi-model gateway where one key and one OpenAI-compatible endpoint reach 170+ image, video, audio and language models.

Independent hosted-API integration. Not affiliated with or endorsed by the authors; does not redistribute their weights. All credit for the model is theirs.

What it does

The open, Apache-2.0 4B variant of Black Forest Labs’ FLUX.2 family. Text-to-image, or image-to-image with up to 3 reference images (each is compressed to about 1 megapixel before generation). Generation itself usually takes 1–2 seconds. There are no resolution tiers to choose or pay for; you pick the shape with aspect_ratio.

FLUX.2 Klein β€” hosted API access sample

A sample produced through the apimodels.app API.

Use it via API

On apimodels.app the model is served as flux-2-klein-4b. Get a key at apimodels.app, then:

# text-to-image (sync: pass a WxH size and no callback_url, get the image in the same response)
curl -X POST https://api.apimodels.app/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{ "model": "flux-2-klein-4b", "prompt": "a cozy bookstore cafe, warm light", "size": "1360x768" }'

Image-to-image: add "image_urls": ["https://example.com/a.jpg"] (1 to 3 images) and, to keep the reference's shape, "aspect_ratio": "match_input_image". Other fields: aspect_ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 5:4, 4:5, 21:9, 9:21, match_input_image; default 1:1), output_format (jpg / png / webp, default jpg), seed, callback_url. Without a WxH size the call is async: poll GET /v1/images/generations?task_id=... until state is completed.

Pricing

Tier Price
flux-2-klein-4b $0.006 / image (flat)
each reference image +$0.0015 (up to 3)

Text-to-image is $0.006; with 1 reference image $0.0075; with 3 reference images $0.0105. Failed jobs are not charged. Result files are kept for 30 days; download anything you want to keep.

Links

More browser demos, a dataset and API guides: apimodels.app API demos collection

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Collection including stimi/flux-2-klein-api