black-forest-labs / flux-2-klein-4b
Very fast image generation and editing model. 4 steps distilled, sub-second inference for production and near real-time applications.
- Price: $0.003 per image, billed from prepaid credit. Failed runs are free.
- License: Apache-2.0
- Source: https://github.com/black-forest-labs/flux2
- Collection: Generate images
- Status: available now
Run black-forest-labs/flux-2-klein-4b with the API
curl -s https://binerai.biner.dev/v1/predictions \
-H "Authorization: Bearer $BINERAI_TOKEN" \
-H "Content-Type: application/json" \
-d '{"model":"black-forest-labs/flux-2-klein-4b","input":{"prompt":"a red fox in a snowy forest"}}'
Then poll GET https://binerai.biner.dev/v1/predictions/:id or pass a webhook URL. Full reference: API docs.
Input
| Field | Type | Description |
|---|---|---|
prompt | string | What to generate, or how to edit the reference images |
images | array, default [] | Up to 5 reference image URLs for editing. Leave empty for text to image. jpeg, png or webp. |
aspect_ratio | string | Aspect ratio of the output. 'match_input_image' follows the first reference image. Defaults to 1:1, or match_input_image when images are given. |
output_megapixels | string, default "1" | Output size in megapixels |
num_outputs | integer, default 1 | Number of images to generate |
num_inference_steps | integer, default 4 | Sampling steps. The distilled model is tuned for 4. |
seed | integer | Random seed for reproducible results |
Examples
Example runs from Replicate.
- A surreal underwater or cosmic garden scene with bioluminescent flora against a deep navy blue to black background. Delicate, feather-like structures in pale icy blue and white emerge from the left side, resembling ethereal ferns or coral fronds with intricate fractal patterns. These luminous… output
- A hyper-detailed close-up of an ocean wave rendered as thick swirling oil paint. Heavy impasto textures, visible brush ridges, glossy highlights. The wave curls in dramatic motion, white paint forming foam. Background shows simple shapes: a deep cobalt sky and faint reddish mountains. Feels… output
- transform the cake from image 1 so it looks as if it is made of gems pearls and golden necklaces, replace the frosting and surface details with sparkling gemstone textures and smooth pearl elements, add delicate strands of gold that mimic jewelry draped across the cake, keep the shape and… output
- A surreal long-lens shot of a woman in a red dress running across a field of soft, rounded volcanic hills. Deep rust and charcoal tones, cobalt sky overhead. Painterly matte texture, soft light, blurred motion. Minimal, timeless, and silent. output
- A group of baby penguins in a trampoline park, having the time of their lives, 80s vintage photo output
- Hyper realistic 3D abstract glossy sculpture with smooth liquid like shapes thick twisted forms blobs drips and splash style protrusions like melted lacquer or glossy resin. Interconnected organic shapes bending and stretching dynamically. Colors are replaced with a new surprising palette. Strong… output
Description via replicate.