Skip to main content

Try FLUX.2 [flex] in the Workbench

Run this model interactively, tune parameters, and compare outputs.
Model ID: flux-2-flex FLUX.2 [flex] is an image generation model that excels in high-quality image creation and editing with strong control over text rendering, typographic layout, and precise prompt adherence. It provides granular control over image generation, allowing users to balance speed, quality, and cost by adjusting inference steps and guidance scale, and supports up to 10 reference images for tasks such as style transfer, compositing, and product continuity. Some other noteworthy features of FLUX.2 [flex] include:
  • Superior text and caption rendering, making it well-suited for infographics, marketing materials, and brand assets.
  • JSON-structured prompts for precise compositional control.
  • Accurate color reproduction, including support for exact HEX color codes, which is valuable for product visualization.
MetricValue
Parameter CountUnknown
Mixture of ExpertsUnknown
Context LengthUnknown
MultilingualNo
Quantized*Yes
*Quantization is specific to the inference provider and the model may be offered with different quantization levels by other providers.

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": "flux-2-flex",
  "prompt": "Draw a parody of the Mona Lisa by Leonardo da Vinci with Bloxy, the cartoon ox in the reference image, as Lisa del Giocondo. Keep Bloxy in the original style of the reference image with the cartoon ox, but adapt its pose to the pose depicted in the Mona Lisa. Don'\''t include its arms or legs in the painting.",
  "input_image": [
    "https://hub.oxen.ai/api/repos/elau/assets/file/main/bloxy/bloxy_cropped_512x512.png"
  ]
}'

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/flux-2-flex

Request parameters

Required parameters

FieldTypeDefaultDescription
promptstring"Draw a parody of the Mona Lisa by Leonardo da Vinci with Bloxy, the cartoon ox in the reference image, as Lisa del Giocondo. Keep Bloxy in the original style of the reference image with the cartoon ox, but adapt its pose to the pose depicted in the Mona Lisa. Don't include its arms or legs in the painting."Prompt for generated image
input_imagearray<string>["https://hub.oxen.ai/api/repos/elau/assets/file/main/bloxy/bloxy_cropped_512x512.png"]Input images to transform or use as reference (supports multiple image urls)

Optional parameters

FieldTypeDefaultDescription
aspect_ratiostring"2:3"Aspect ratio for the generated image One of: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, match_input_image.
resolutionstring"1 MP"Resolution for the generated image One of: 1 MP, 2 MP, 0.5 MP.
num_inference_stepsinteger30Number of denoising steps. Recommended range is 28-50, and lower number of steps produce lower quality outputs, faster. Range: 1 – 50.
guidancenumber2Guidance for generated image. Lower values can give more realistic images. Good values to try are 2, 2.5, 3 and 3.5 Range: 0 – 10.
seedintegerRandom seed. Set for reproducible generation
output_formatstring"webp"Format of the output images One of: webp, jpg, png.
output_qualityinteger80Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs Range: 0 – 100.
disable_safety_checkerbooleanfalseDisable safety checker for generated images.