Image Generation

Flux 2 ProAPI

High-quality image generation and editing with support for eight reference images

Test in Dashboard View Docs ← All Tools

Three ways to use this tool

REST API

One POST request. Get the result back directly — as an image, video, or JSON depending on the tool.

terminal
curl -X POST https://apiai.me/api/workflow/flux-2-pro \
     -H "X-API-Key: YOUR_API_KEY" \
     -F "image=@input.jpg" \
     -F "aspect_ratio=1:1" \
     -F "height=VALUE" \
     -F "format=webp" \
     -F "quality=80" \
     -F "prompt=VALUE" \
     -F "resolution=1 MP" \
     -F "safety_tolerance=2" \
     -F "seed=VALUE" \
     -F "width=VALUE"
     --output result.png

Dashboard Playground

Test this tool visually before writing any code. Upload an image, set parameters, and see the result live. When it looks right, copy the auto-generated curl command and paste it into your app.

  1. Open the dashboard → API Toolbox
  2. Find Flux 2 Pro and click it
  3. Upload your input and adjust parameters
  4. Copy the curl command and ship
Open Dashboard →

Batch Processing

Process hundreds of images at once without writing a loop. Upload a CSV with one row per item, set your parameters, and download the results as a ZIP when they're done.

  1. Open the dashboard → Batches
  2. Select Flux 2 Pro
  3. Add your content and start the batch
  4. Download results ZIP when complete
Go to Batches →

Parameters

Name Type Required Description Default / Options
aspect_ratio string optional Aspect ratio for the generated image. Use 'match_input_image' to match the first input image's aspect ratio. match_input_imagecustom1:116:93:22:34:55:49:163:44:3
height string optional 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). —
format string optional Format of the output images. webpjpgpng
quality string optional Quality when saving the output images, from 0 to 100. 100 is best quality, 0 is lowest quality. Not relevant for .png outputs 80
prompt string required Text prompt for image generation —
resolution string optional Resolution in megapixels. Up to 4 MP is possible, but 2 MP or below is recommended. The maximum image size is 2048x2048, which means that high-resolution images may not respect the resolution if aspect ratio is not 1:1.Resolution is not used when aspect_ratio is 'custom'. When aspect_ratio is 'match_input_image', use 'match_input_image' to match the input image's resolution (clamped to 0.5-4 MP). match_input_image0.5 MP1 MP2 MP4 MP
safety_tolerance string optional Safety tolerance, 1 is most strict and 5 is most permissive 2
seed string optional Random seed. Set for reproducible generation —
width string optional 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). —

Ready to integrate?

Get an API key, test Flux 2 Pro in the dashboard, and copy the curl command.

Get API Key Full API Reference