API docs / Image models

FLUX 2 Flex API

Generates and edits images from text prompts with adjustable quality-speed control and support for up to ten reference images. Excels at text rendering, typography, and readable captions, making it ideal for infographics, UI mockups, memes, and product designs with text. Features multi-reference image blending for style transfer and compositional guidance. Allows fine-tuning of guidance scale to control how closely the model follows prompts and adjustable inference steps (6-50) to balance speed versus quality. Supports image editing at resolutions up to 4 megapixels while maintaining coherence. Accepts multiple aspect ratios and produces outputs in webp, jpg, or png formats.

Model id
black-forest-labs/flux-2-flex
Provider
Flux AI
Output
Image
Price
From 21 credits per run, the same as on voor.ai. Options such as length or resolution can change it.

Request

POST https://voor.ai/v1/generations with "model": "black-forest-labs/flux-2-flex". Poll GET /v1/tasks/{id} or receive the signed webhook. See the overview for keys, idempotency, webhooks and errors.

curl https://voor.ai/v1/generations \
  -H "Authorization: Bearer $VOOR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "black-forest-labs/flux-2-flex",
  "input": {
    "prompt": "A red fox standing in fresh snow at golden hour, soft light"
  },
  "callback_url": "https://example.com/webhooks/voor"
}'

# Then poll the task (or wait for the webhook):
curl https://voor.ai/v1/tasks/TASK_ID \
  -H "Authorization: Bearer $VOOR_API_KEY"

Input parameters

NameTypeDetails
promptrequiredstring

Text prompt for image generation

reference_imagesarray of URLs

List of input images for image-to-image generation. Maximum 10 images. Must be jpeg, png, gif, or webp.

Default: []

Up to 10 files · Accepts image/*

aspect_ratiostring

Default: 1:1

One of: match_input_image, custom, 1:1, 16:9, 3:2, 2:3, 4:5, 5:4, 9:16, 3:4, 4:3

resolutionstring

Default: 1 mp

One of: match_input_image, 0.5 mp, 1 mp, 2 mp, 4 mp

enhance_promptboolean

Automatically modify the prompt for more creative generation

Default: true

seednumber

Random seed. Set for reproducible generation

guidancenumber

Guidance scale for generation. Controls how closely the output follows the prompt

Default: 4.5

Min 1.5 · Max 10

stepsnumber

Number of inference steps

Default: 30

Min 1 · Max 50

output_formatstring

Default: webp

One of: webp, jpg, png

heightnumber

Height of the generated image. Only used when aspect_ratio=custom. Must be a multiple of 16 (if it's not, it will be rounded to nearest multiple of 16).

Min 256 · Max 2048

output_qualitynumber

Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs

Default: 80

Min 0 · Max 100

widthnumber

Width of the generated image. Only used when aspect_ratio=custom. Must be a multiple of 16 (if it's not, it will be rounded to nearest multiple of 16).

Min 256 · Max 2048