API docs / Image models
FLUX 2 Klein 4B API
Generates high-quality photorealistic images from text prompts with sub-second inference speed. This 4-billion parameter model is distilled from FLUX.2's larger base model, delivering professional image quality optimized for production and near real-time applications. Supports image-to-image generation with up to 5 input images, maintaining consistent characters, products, or styles across generations. Excels at text rendering with clean, readable typography in complex layouts, infographics, and UI mockups. Features accurate spatial reasoning with proper lighting, shadows, reflections, and perspective relationships. Generates images up to 4 megapixels with precise color control including hex code specification. Handles multi-reference inputs for brand consistency and character continuity across multiple scenes. Optimized for workflows requiring reliable output on consumer hardware while maintaining sophisticated understanding of composition, materials, and real-world physics.
- Model id
black-forest-labs/flux-2-klein-4b- Provider
- Flux AI
- Output
- Image
- Price
- From 1 credits per run, the same as on voor.ai. Options such as length or resolution can change it.
Request
POST https://voor.ai/v1/generations with "model": "black-forest-labs/flux-2-klein-4b". Poll GET /v1/tasks/{id} or receive the signed webhook. See the overview for keys, idempotency, webhooks and errors.
curl https://voor.ai/v1/generations \
-H "Authorization: Bearer $VOOR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "black-forest-labs/flux-2-klein-4b",
"input": {
"prompt": "A red fox standing in fresh snow at golden hour, soft light"
},
"callback_url": "https://example.com/webhooks/voor"
}'
# Then poll the task (or wait for the webhook):
curl https://voor.ai/v1/tasks/TASK_ID \
-H "Authorization: Bearer $VOOR_API_KEY"Input parameters
| Name | Type | Details |
|---|---|---|
promptrequired | string | Text prompt for image generation. |
reference_images | array of URLs | List of input images for image-to-image generation. Maximum 5 images. Must be jpeg, png, gif, or webp. Default: Up to 10 files · Accepts image/* |
aspect_ratio | string | Default: One of: 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 |
seed | number | Random seed. Set for reproducible generation |
output_format | string | Default: One of: webp, jpg, png |
go_fast | boolean | Run faster predictions with additional optimizations. Default: |
megapixels | string | Default: One of: 0.25, 0.5, 1, 2, 4 |
output_quality | number | Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs. Default: Min 0 · Max 100 |