Pular para o conteúdo principal
Model logo

API do Flux.2 Pro

  • Texto para imagem
  • Imagem para imagem
Toque para enviarPNG, JPG, WEBP, GIF · Máx. 100 MB
Saída

Seu image gerado aparecerá aqui

Atualizado

What is the Flux.2 Pro API?

The Flux.2 Pro API is live on UnificAlly as black-forest-labs/flux.2-pro, from $0.027 per image. Flux.2 Pro is the balanced production variant of Black Forest Labs' Flux.2: seven aspect ratios, 0.6–4 MP output and multi-image references. Flux.2 itself is Black Forest Labs' December 2025 image model and the latest evolution of the Flux line, and the Flux 2 API on UnificAlly exposes it as three variants on the same /v1/tasks endpoint: Flex (with explicit diffusion controls), Pro (the balanced default), and Max (tuned for top output quality). All three accept the same prompt-and-references core: an optional list of reference images, seven aspect ratios from 21:9 through 9:21, and resolutions at 0.6, 1, 2, or 4 megapixels. Currently the strongest open-model lineup for production stills.

TL;DR: Pick Pro ($0.027 per image at the default 1 MP) for standard production runs with no tuning; larger presets cost more per image, though far less than the pixel count suggests, and each reference image adds a small charge. Flex adds steps, guidance, and seed, Max is tuned for top quality, and Klein 9B or 4B are the cheaper drafting siblings on the same request shape. All take image_urls and seven aspect ratios from 21:9 to 9:21.

Flux.2 Pro API specs

Model IDblack-forest-labs/flux.2-pro
EndpointPOST https://api.unifically.com/v1/tasks
Request typesText-to-image, image generation with reference images
Output size0.6, 1, 2, or 4 megapixels
Aspect ratio21:9, 16:9, 4:3, 1:1, 3:4, 9:16, 9:21
Reference inputsImage URLs in image_urls
Rate at 0.6 MP$0.027
Rate at 1 MP$0.027
Rate at 2 MP$0.0405
Rate at 4 MP$0.054

Billing is per image, with no subscription. Each reference image adds a per-image charge on top. The Flux.2 pricing guide and the pricing page show the live rate table.

How to use the Flux.2 Pro API

  1. Create an API key on the API keys page.
  2. Send a POST request to /v1/tasks with the model ID and an input object.
  3. Read the task_id from the response, then check the task until it is finished, or pass a callback URL and wait for the result.
curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "black-forest-labs/flux.2-pro",
    "input": {
      "prompt": "A photorealistic portrait of a woman in golden hour light",
      "aspect_ratio": "9:16",
      "resolution": "2mp"
    }
  }'

The response returns the task ID straight away:

{
  "code": 200,
  "success": true,
  "data": {
    "task_id": "abc123def456",
    "status": "processing"
  }
}

The finished task carries the image URL.

curl https://api.unifically.com/v1/tasks/{task_id} \
  -H "Authorization: Bearer YOUR_API_KEY"

With reference images

The Flux.2 Pro API takes reference images in the same request. Add their URLs in image_urls.

curl -X POST https://api.unifically.com/v1/tasks \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "black-forest-labs/flux.2-pro",
    "input": {
      "prompt": "A portrait in this style",
      "image_urls": ["https://example.com/ref1.jpg", "https://example.com/ref2.jpg"],
      "resolution": "2mp"
    }
  }'

Flux.2 Pro API parameters

ParameterTypeDefaultWhat it does
promptstringrequiredText description of the image
aspect_ratiostring16:921:9, 16:9, 4:3, 1:1, 3:4, 9:16, or 9:21
resolutionstring1mp0.6mp, 1mp, 2mp, or 4mp
image_urlsstring[]noneReference image URLs
nsfw_checkbooleanfalseChecks the prompt and input images for NSFW content before generating. Off unless set to true

The Flux.2 Pro API documentation has the full reference.

Key features of Flux.2

Three variants on the same endpoint

Flex, Pro, and Max share a request shape. Switch model identifiers (flux.2-flex, flux.2-pro, flux.2-max) to swap between explicit diffusion controls, balanced production runs, and maximum quality.

Up to 4MP output

Resolution selector picks 0.6, 1, 2, or 4 megapixels. Useful for hero stills that need to survive crop, zoom, or high-DPI display without an upscale step.

Reference images on all variants

Pass reference URLs in image_urls on any variant. Useful for product references, mood boards, and brand-locked sequences without dropping to a separate edit endpoint.

Cinematic aspect ratio range

Shared ratios cover 21:9 ultrawide, 16:9 widescreen, 4:3 standard, 1:1 square, 3:4 portrait, 9:16 vertical, and 9:21 tall. All three variants share the same seven ratios.

Diffusion controls in Flex

Flex exposes steps (1–50) and guidance (1.5–10) for repeatable behaviour while you sweep settings. Useful for concept art and look development.

What Flux.2 Pro is best for

  • Marketing stills

    Match brand crops with precise aspect_ratio and resolution settings.

  • Concept art

    Flex mode for tweaking with steps and guidance before locking a look.

  • Reference-driven design

    Product or mood-board images as image_urls alongside the prompt.

  • Key art and posters

    Max for cinematic 21:9 layouts and tall 9:21 posters.

  • UX and slides

    Fast Pro runs when Flex-level tuning is unnecessary.

  • Batch pipelines

    Select Flex, Pro, or Max per job based on latency and budget.

Flux.2 Pro variants

Flux.2 has three models on the same API, each with its own page. They share the prompt-and-references core, but each exposes a slightly different control surface.

Pro

This page. The balanced everyday model: seven aspect ratios, no manual diffusion controls, faster per call. Default choice for marketing stills and reference-driven jobs.

Flex

Explicit diffusion controls. steps and guidance are first-class parameters. Use it when you are tuning a look (concept art, mood iteration) and want repeatable behaviour as you sweep settings.

Max

Same core, tuned for maximum output quality. Use it when the brief is cinematic key art or a final render where quality beats cost and latency.

Flux.2 Pro use cases

Tune a concept-art look on Flex by sweeping steps and guidance until the rendered material matches your reference; then roll the same prompt onto Pro for the production batch. Build a marketing still set across the full ratio range (21:9 banner, 16:9 landing, 1:1 feed, 9:16 reel) on Pro from one prompt. Use Max for editorial cover work where final quality is the brief. Run high-volume reference-driven design (mood boards, product flat-lays) by passing several references on any variant.

Perguntas frequentes

Perguntas frequentes sobre Flux.2 Pro

Flux.2 by Black Forest Labs is exposed as three variants: Flex, Pro, and Max. Each is a separate model identifier on the same /v1/tasks endpoint. Flex adds steps, guidance, seed, and prompt upsampling controls. All three share the same seven aspect ratios.

A key comes from the API keys page once you register, and it goes in an Authorization: Bearer <key> header. Point the first request at https://api.unifically.com/v1/tasks with black-forest-labs/flux.2-pro and a prompt; the same endpoint also serves Flex and Max, so switching variant is a change of model ID.

Flux.2 Pro takes model: black-forest-labs/flux.2-pro with an input containing the required prompt, plus optional aspect_ratio, resolution (0.6mp, 1mp, 2mp or 4mp) and an image_urls list for reference images in the same call. It runs as a task: keep the returned task_id, then fetch /v1/tasks/{task_id} until the finished task shows the image URL.

Use Flex when you want explicit diffusion controls (steps, guidance). Use Pro for standard production runs without tuning. Use Max when the final render needs the highest output quality.

Pass reference URLs in image_urls on any variant. The API docs set no fixed maximum, and the playground uploads up to 10.

Flux.2 improves prompt adherence and detail accuracy over Flux 1.1 Pro. Stable Diffusion 3 is the closest open-source competitor but trails on text rendering and complex composition. Flux.2 Max is the closest current open competitor to Nano Banana Pro and Seedream 4 on quality.

Use Klein 4B or 9B when you want the smallest, fastest Flux.2 sibling for high-volume drafts. Use Flex, Pro, or Max for production work where the extra processing time is acceptable.

Guias e comparações do Flux.2 Pro

Confira preços, limites e resultados testados antes de usar este modelo.