Flux 2 Klein 4B - Image Generator
Compact 4 billion parameter image generation model by Black Forest Labs. 4-step distilled for sub-second inference, making it ideal for real-time applications, high-volume pipelines, and interactive products that need fast, quality image generation.
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be IMAGE_GENERATOR |
model | string | Yes | Must be black-forest-labs/flux-2-klein-4b |
promptObject | object | Yes | Configuration object containing all generation parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
prompt | string | Yes | Text description of the image to generate | - |
aspect_ratio | string | No | Image aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:5, 5:4) | 1:1 |
output_format | string | No | Output file format (webp, jpg, png) | webp |
output_quality | number | No | Output image quality (0-100) | 80 |
num_inference_steps | number | No | Number of inference steps (1-4) | 4 |
go_fast | boolean | No | Enable fastest generation mode | true |
megapixels | string | No | Output resolution in megapixels (0.25, 1) | 1 |
disable_safety_checker | boolean | No | Disable built-in safety filtering | false |
seed | number | No | Random seed for reproducibility | Random |
Code Examples
- cURL
- JavaScript
- Python
curl --location 'https://api.1min.ai/api/features' \
--header 'API-KEY: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"type": "IMAGE_GENERATOR",
"model": "black-forest-labs/flux-2-klein-4b",
"promptObject": {
"prompt": "A serene mountain lake at dawn, misty atmosphere, photorealistic",
"aspect_ratio": "16:9",
"num_inference_steps": 4,
"go_fast": true,
"megapixels": "1",
"output_format": "webp",
"output_quality": 80
}
}'
fetch('https://api.1min.ai/api/features', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'API-KEY': 'YOUR_API_KEY'
},
body: JSON.stringify({
type: 'IMAGE_GENERATOR',
model: 'black-forest-labs/flux-2-klein-4b',
promptObject: {
prompt: 'A serene mountain lake at dawn, misty atmosphere, photorealistic',
aspect_ratio: '16:9',
num_inference_steps: 4,
go_fast: true,
megapixels: '1',
output_format: 'webp',
output_quality: 80
}
})
})
import requests
url = "https://api.1min.ai/api/features"
headers = {
"Content-Type": "application/json",
"API-KEY": "YOUR_API_KEY"
}
data = {
"type": "IMAGE_GENERATOR",
"model": "black-forest-labs/flux-2-klein-4b",
"promptObject": {
"prompt": "A serene mountain lake at dawn, misty atmosphere, photorealistic",
"aspect_ratio": "16:9",
"num_inference_steps": 4,
"go_fast": True,
"megapixels": "1",
"output_format": "webp",
"output_quality": 80
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresDescribe the image you want to generate
Number of inference steps (1-4)
Output image quality (0-100)
Random seed for reproducibility
Generated cURL Command:
curl -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <your-api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_GENERATOR",
"model": "black-forest-labs/flux-2-klein-4b",
"promptObject": {
"prompt": "A serene mountain lake at dawn, misty atmosphere, photorealistic",
"aspect_ratio": "16:9",
"num_inference_steps": 4,
"go_fast": true,
"megapixels": "1",
"output_format": "webp",
"output_quality": 80
}
}'
Response Format
{
"aiRecord": {
"uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"model": "black-forest-labs/flux-2-klein-4b",
"type": "IMAGE_GENERATOR",
"status": "SUCCESS",
"createdAt": "2026-03-27T10:00:00.000Z",
"aiRecordDetail": {
"promptObject": {
"prompt": "A serene mountain lake at dawn, misty atmosphere, photorealistic",
"aspect_ratio": "16:9",
"num_inference_steps": 4,
"go_fast": true,
"megapixels": "1",
"output_format": "webp",
"output_quality": 80
},
"resultObject": [
"development/images/2026_03_27_10_00_01_001_mountain_lake.webp"
]
},
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2026_03_27_10_00_01_001_mountain_lake.webp?..."
}
}
Use Cases
- Real-time Applications: Sub-second generation for interactive tools
- High-volume Pipelines: Cost-efficient bulk image generation
- Rapid Prototyping: Near-instant concept visualization
- Mobile Apps: Fast generation for resource-sensitive environments
- Creative Iteration: Quick multi-variation generation workflows
Notes
Speed-First Model
Flux 2 Klein 4B is optimized for speed with 4-step distillation. For higher fidelity output, consider Flux 2 Dev or Flux 2 Pro.