FLUX 3 Image Klein
A fast Black Forest Labs image model: creates images from text, edits and combines 1–10 of your images, places elements in bounding boxes. Up to 4K, renders text well. Billed per megapixel.
Specifications
Capabilities
Description
What it does
- Image from text: describe the subject, lighting, style and any text. The model renders printed text in images well, including Cyrillic, which suits product cards and posters.
- Edits and composition from images: 1 to 10 PNG, JPEG or WEBP images, each up to 16 megapixels and 20 MB. Write the edit as an instruction: what to change and what to keep. The first image is the one being edited; in the prompt it is <ref_image_0>, the second is <ref_image_1>, and so on. Style transfer: "Turn Image 1 in the Style of Image 2".
- Resolution (resolution): 768sq (768×768), 1k (about 1 megapixel, default for text to image), 1.5k (about 2.25), 2k (about 4), 4k (16 megapixels). Without resolution an edit keeps the size of the first image.
- Aspect ratio (aspect_ratio): 21:9, 2:1, 16:9, 3:2, 7:5, 4:3, 5:4, 1:1, 4:5, 3:4, 5:7, 2:3, 9:16, 1:2, 9:21 or auto (default). With auto an edit keeps the first image's ratio and text to image picks a ratio that suits the prompt.
- Seed (seed, 0 to 4294967295): the same seed with the same prompt gives a similar image. Without it every image is new.
- Bounding boxes: a JSON list of elements at the end of the prompt, their names in angle brackets in the text. The grid runs from 0 to 1000 on each side, a box is [x0, y0, x1, y1] from the top left corner. Text to image: {"id": "silhouette_1", "bbox": [150, 150, 850, 850], "desc": "description"}. Edits: {"id": "cat_1", "from": "ref_image_0", "src_bbox": [where it is], "tgt_bbox": [where it goes], "desc": "description"}. Keep: both boxes equal; move: a new tgt_bbox; remove: tgt_bbox null; add or recolor: from null, src_bbox null.
- One image per request, always JPEG. The model has no negative prompt, mask, transparent background or step count.
How to call
Image from text: POST /v1/images/generations with a JSON body:
{"model": "black-forest-labs/flux-3-image-klein-08130", "prompt": "A golden retriever puppy playing in autumn leaves", "resolution": "1k", "aspect_ratio": "3:2"}Edits from images: POST /v1/images/edits as multipart: repeat the image field for each image (up to 10), plus prompt, model and the other fields above. Or /v1/images/generations with an images field: https links or data:image/png;base64,….
curl https://api.neuralbridge.ru/v1/images/edits -H "Authorization: Bearer $API_KEY" -F model=black-forest-labs/flux-3-image-klein-08130 -F image=@photo.jpg -F "prompt=Make it a winter night, keep everything else"An image takes 15–20 seconds, 4K up to a minute and a half. Send an Idempotency-Key header: repeating a request with the same key within a day does not start a second paid generation; it returns the image already paid for.
Response
data[0].b64_json is the JPEG image in base64, output_format is jpeg, usage holds output_megapixels (megapixels billed), input_megapixels (megapixels of the input images), and the width and height of the image.
Errors
- 400: invalid input; the error text names the field (for example, an unknown aspect ratio, more than 10 images or an image over 16 megapixels). Rejected requests are not billed.
- 422 with code content_filtered: the prompt or an image did not pass content moderation.
- 402: not enough funds on the balance. 429: the model is overloaded. 502 or 504: the image was not received; nothing is charged.
Price
Billed per megapixel of the finished image: the first megapixel at one rate, each further one at another, input images free (rates on this page). Megapixels follow the chosen resolution: 768sq and 1k are 1 megapixel, 1.5k is 2.25, 2k is 4, 4k is 16. Without resolution it is billed as 1k, even when an edit keeps the larger size of the first image.
Parameters
Endpoints
Code examples
Other Black Forest Labs models
Related models: image generation
/v1 in base_url. For Anthropic SDK — without /v1.