Skip to main content

Try FLUX.2 Klein 4B in the Workbench

Run this model interactively, tune parameters, and compare outputs.
Model ID: black-forest-labs-flux-2-klein-4b FLUX.2 Klein 4B from Black Forest Labs is a lightweight version of the FLUX.2 family featuring 4 billion parameters, designed for efficient text-to-image generation with support for various aspect ratios and quality settings. It accepts text prompts and optional image inputs for reference, producing high-quality PNG, JPEG, or WebP images. Key features include customizable inference steps (1-50), guidance scale, and seed control for reproducible results. Ideal for real-time applications and resource-constrained environments.

Example request

Use the Workbench as a request builder: configure parameters for this model in the UI, then open the API tab to copy the exact cURL or Python call.
See the image editing reference for more details.
curl -X POST https://hub.oxen.ai/api/ai/images/edit \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OXEN_API_KEY" \
  -d '{
  "model": "black-forest-labs-flux-2-klein-4b",
  "prompt": "<prompt>"
}'

Fetch model details

The models endpoint returns the full model object, including its json_request_schema.
curl -H "Authorization: Bearer $OXEN_API_KEY" https://hub.oxen.ai/api/ai/models/black-forest-labs-flux-2-klein-4b

Request parameters

Required parameters

FieldTypeDefaultDescription
promptstringText description of the image to generate

Optional parameters

FieldTypeDefaultDescription
input_imagearray<string>Input images to transform or use as reference (supports multiple image urls)
aspect_ratiostring"1:1"Aspect ratio for the generated image One of: 1:1, 16:9, 9:16, 4:3, 3:4.
output_qualitystring"standard"Quality setting for output image One of: standard, high.
output_formatstring"png"Format of the output image One of: png, jpeg, webp.
seedintegerRandom seed. Leave blank to randomize
num_inference_stepsinteger28Number of denoising steps Range: 1 – 50.
guidance_scalenumber2.0Scale for classifier-free guidance Range: 0.0 – 10.0.