NeuralBridge
Sign in Download IDE
Black Forest Labs

FLUX 3 Image Klein

image generation

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

Context window
—
Max tokens in response
—
Vendor
Black Forest Labs
Release
—
Login
text, images
Output
images

Capabilities

generationeditingmulti_ref

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

prompt
The request text: what you want to get. For video: the scene, camera movement and light; for music: genre, mood, instruments, tempo. The length limit depends on the model.
images
1 to 16 PNG, JPEG or WEBP images: edits, style transfer, building a scene from objects. Up to 25 MB each, 50 MB in total.
reference_images
How many reference images can be passed.
reference_image_mb
Megabytes per image.
reference_images_total_mb
reference_image_megapixels
The largest size of one input image in megapixels (millions of pixels). Downscale larger images.
reference_image_formatsimage/png · image/jpeg · image/webp
aspect_ratiodefault: auto · auto · 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
Aspect ratio of the result, for example 16:9, 9:16 or 1:1.
resolutiondefault: 1k · 768sq · 1k · 1.5k · 2k · 4k
Video resolution, for example 720P or 1080P. Also affects the price.
seed
Pins randomness: repeating a request with the same seed and parameters returns the same result.
resolution_megapixels768sq:1 · 1k:1 · 1.5k:2.25 · 2k:4 · 4k:16
Megapixels billed for an image of each resolution tier: 768sq and 1k are 1, 1.5k is 2.25, 2k is 4, 4k is 16. Without resolution it is billed as 1k, whatever the size of the edit.

Endpoints

POSThttps://api.neuralbridge.ru/v1/images/generationsprimary
Images — generations — Generate an image from a text description.

Code examples

python
from openai import OpenAI

client = OpenAI(api_key="YOUR_API_KEY", base_url="https://api.neuralbridge.ru/v1")

image = client.images.generate(model="black-forest-labs/flux-3-image-klein-08130", prompt="Рыжий кот в скафандре")

print(image.data[0].url or image.data[0].b64_json[:64])
For OpenAI SDK, specify /v1 in base_url. For Anthropic SDK — without /v1.
Prices
First megapixel of the image 1,4175 ₽
Each subsequent megapixel 0,2626 ₽
The request cost in rubles — in the response, field usage.cost
Identifier
black-forest-labs/flux-3-image-klein-08130
Get API key