NeuralBridge
Sign in Download IDE
Black Forest Labs

flux 2 klein 4b

image generation

Compact image generation model Black Forest Labs FLUX.2 klein 4B for text-to-image.

Specifications

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

Capabilities

streaminggeneration

Parameters

size
Result size as a "width×height" string.
width
Image width in pixels.
height
Image height in pixels.
seed
Pins randomness: repeating a request with the same seed and parameters returns the same result.
negative_prompt
What must NOT appear in the result: list unwanted objects, details or styling.

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-2-klein-4b-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
Image / image0,143 ₽
The request cost in rubles — in the response, field usage.cost
Identifier
black-forest-labs/flux-2-klein-4b-08130
Get API key