Flux 2 Klein 4B - Image Editor
Fast and cost-efficient text-based image editing by Black Forest Labs. The 4B parameter architecture delivers quick, responsive edits ideal for prototyping and high-throughput workflows.
Endpoint
Request Headers
| Field | Value |
|---|---|
| API-KEY | <api-key> |
| Content-Type | application/json |
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be IMAGE_EDITOR |
model | string | Yes | Must be black-forest-labs/flux-2-klein-4b |
promptObject | object | Yes | Configuration object containing all editing parameters |
Prompt Object Parameters
| Parameter | Type | Required | Description | Default |
|---|---|---|---|---|
imageUrl | string | Yes | Asset path of the image to edit (from Asset API) | - |
prompt | string | Yes | Text description of the desired edit | - |
aspect_ratio | string | No | Output aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:5, 5:4) | match_input_image |
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 denoising steps (1-50) | 28 |
go_fast | boolean | No | Enable speed-optimized generation | false |
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 -X POST "https://api.1min.ai/api/features" \
-H "API-KEY: <api-key>" \
-H "Content-Type: application/json" \
-d '{
"type": "IMAGE_EDITOR",
"model": "black-forest-labs/flux-2-klein-4b",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_10_29_882_cat.png",
"prompt": "Change the shirt color to bright red",
"num_inference_steps": 20,
"go_fast": true,
"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_EDITOR',
model: 'black-forest-labs/flux-2-klein-4b',
promptObject: {
imageUrl: 'development/images/2025_12_04_18_10_29_882_cat.png',
prompt: 'Change the shirt color to bright red',
num_inference_steps: 20,
go_fast: true,
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_EDITOR",
"model": "black-forest-labs/flux-2-klein-4b",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_10_29_882_cat.png",
"prompt": "Change the shirt color to bright red",
"num_inference_steps": 20,
"go_fast": True,
"output_format": "webp",
"output_quality": 80
}
}
response = requests.post(url, headers=headers, json=data)
Interactive Playground
API Playground
https://api.1min.ai/api/featuresAsset path of the source image to edit
Describe the edit you want to apply
Number of denoising steps (1-50)
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_EDITOR",
"model": "black-forest-labs/flux-2-klein-4b",
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_10_29_882_cat.png",
"prompt": "Change the shirt color to bright red",
"num_inference_steps": 20,
"go_fast": true,
"output_format": "webp",
"output_quality": 80
}
}'
Response Format
{
"aiRecord": {
"uuid": "e5f6a7b8-c9d0-1234-efab-345678901234",
"model": "black-forest-labs/flux-2-klein-4b",
"type": "IMAGE_EDITOR",
"status": "SUCCESS",
"createdAt": "2026-03-27T10:00:00.000Z",
"aiRecordDetail": {
"promptObject": {
"imageUrl": "development/images/2025_12_04_18_10_29_882_cat.png",
"prompt": "Change the shirt color to bright red",
"num_inference_steps": 20,
"go_fast": true,
"output_format": "webp",
"output_quality": 80
},
"resultObject": [
"development/images/2026_03_27_10_00_07_001_edited.webp"
]
},
"temporaryUrl": "https://s3.us-east-1.amazonaws.com/asset.1min.ai/development/images/2026_03_27_10_00_07_001_edited.webp?..."
}
}
Use Cases
- Rapid Prototyping: Quickly iterate on edits during design review cycles
- Color & Texture Swaps: Fast single-attribute edits like color changes
- High-Volume Pipelines: Cost-efficient editing for large batches of images
- Interactive Apps: Low-latency edits for real-time user-facing applications