API docs / Image models

flux-2-dev API

Generates and edits images from text descriptions using a 32 billion parameter model that combines image generation and editing capabilities. Creates new images from scratch, modifies existing images up to 4 megapixels, or blends up to 10 reference images together while maintaining consistency. Features improved text rendering that produces legible typography, enhanced prompt following for complex structured instructions, photorealistic detail with sharp textures and accurate lighting, and strong grounding in real-world knowledge and spatial relationships. Supports product photography, character designs, infographics, UI mockups, concept art, and marketing materials. Uses latent flow matching architecture with Mistral-3 vision-language model for contextual understanding and rectified flow transformer for spatial composition.

Model id
black-forest-labs/flux-2-dev
Provider
Flux AI
Output
Image
Price
From 5 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-dev". 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-dev",
  "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 description of the image to generate.

reference_imagesarray of URLs

List of input images for image-to-image generation. Maximum 4 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

seednumber

Random seed. Set for reproducible generation.

output_formatstring

Default: webp

One of: webp, jpg, png

go_fastboolean

Run faster predictions with additional optimizations.

Default: true

heightnumber

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

Min 256 · Max 1440

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 in text-to-image mode. Only used when aspect_ratio=custom. Must be a multiple of 32 (if it's not, it will be rounded to nearest multiple of 32).

Min 256 · Max 1440