Skip to main content

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

FieldValue
API-KEY<api-key>
Content-Typeapplication/json

Parameters

ParameterTypeRequiredDescription
typestringYesMust be IMAGE_EDITOR
modelstringYesMust be black-forest-labs/flux-2-klein-4b
promptObjectobjectYesConfiguration object containing all editing parameters

Prompt Object Parameters

ParameterTypeRequiredDescriptionDefault
imageUrlstringYesAsset path of the image to edit (from Asset API)-
promptstringYesText description of the desired edit-
aspect_ratiostringNoOutput aspect ratio (1:1, 16:9, 9:16, 3:2, 2:3, 4:5, 5:4)match_input_image
output_formatstringNoOutput file format (webp, jpg, png)webp
output_qualitynumberNoOutput image quality (0-100)80
num_inference_stepsnumberNoNumber of denoising steps (1-50)28
go_fastbooleanNoEnable speed-optimized generationfalse
megapixelsstringNoOutput resolution in megapixels (0.25, 1)1
disable_safety_checkerbooleanNoDisable built-in safety filteringfalse
seednumberNoRandom seed for reproducibilityRandom

Code Examples

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
}
}'

Interactive Playground

API Playground

https://api.1min.ai/api/features
Asset 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