Skip to main content
FLUX.2 [flex] is a highly configurable text-to-image model from Black Forest Labs, available through Starrise AI. It offers fine-grained control over sampling steps and guidance scale, ideal for design professionals. The API uses synchronous calls — it directly returns Base64-encoded image data.

Key Capabilities

  • Text-to-image — Generate images from text descriptions
  • Step control — Adjust sampling steps (1–50) to flexibly balance speed and quality
  • Guidance scale — Fine-tune prompt adherence (1.5–10)
  • High resolution — supports up to 4MP output resolution
  • Reproducible — Use seed for deterministic generation

Quick Example

curl https://ai.alad.com/v1/images/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "flux-2-flex",
    "prompt": "A cute baby polar bear",
    "size": "1024x1024",
    "inference_steps": 30,
    "guidance_scale": 7.5
  }'

Parameters

ParameterTypeRequiredDescription
modelstringYesFixed value: flux-2-flex
promptstringYesText description for the image
nintegerNoNumber of images to generate (1–4), default 1
sizestringNoOutput resolution, e.g. 1024x1024, supports up to 4MP
inference_stepsintegerNoSampling steps (1–50). Low steps (6–20) for rapid prototyping, high (40–50) for max fidelity
guidance_scalenumberNoGuidance scale (1.5–10). Higher values produce closer adherence to the prompt
output_formatstringNojpeg or png
seedintegerNoRandom seed for reproducibility

Response Fields

FieldDescription
data[].b64_jsonBase64-encoded image data
createdCreation timestamp

API Reference

View the interactive API Playground for FLUX.2 [flex].