Chuyển đến nội dung chính
Logo mô hình

Flux.2 Flex API

  • Văn bản thành Ảnh
  • Ảnh thành Ảnh
Chạm để tải lênPNG, JPG, WEBP, GIF · Tối đa 100MB
Đầu ra

Nội dung image được tạo sẽ hiển thị tại đây

Cập nhật

What is the Flux.2 Flex API?

The Flux.2 Flex API is live on UnificAlly as black-forest-labs/flux.2-flex, from $0.054 per image. Flux.2 Flex is the adjustable image model in Black Forest Labs' Flux.2 family. It exposes steps, guidance, seed, and prompt upsampling alongside the shared prompt, size, aspect-ratio, and reference-image inputs. That extra control is useful when a team needs to test settings instead of accepting a fixed generation setup.

Output can be set to 0.6, 1, 2, or 4 megapixels. Seven aspect ratios cover ultrawide, landscape, square, and portrait work. A request can also carry several reference image URLs, which makes the model suitable for work that starts from product shots, visual references, or an approved design direction.

Flux.2 Flex API specs

Model IDblack-forest-labs/flux.2-flex
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
ControlsSteps, guidance, seed, prompt upsampling
Rate at 0.6 MP$0.054
Rate at 1 MP$0.054
Rate at 2 MP$0.108
Rate at 4 MP$0.162

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 Flex 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-flex",
    "input": {
      "prompt": "A cyberpunk city at night with neon reflections",
      "aspect_ratio": "21:9",
      "resolution": "2mp",
      "guidance": 1.5,
      "steps": 30,
      "seed": 124242,
      "prompt_upsampling": false
    }
  }'

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"

Flux.2 Flex 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
guidancefloatnoneGuidance scale, for example 1.5
stepsintegernoneNumber of generation steps
seedintegerrandomSeed for reproducible results
prompt_upsamplingbooleantrueExpands the prompt before generation for more creative output
nsfw_checkbooleanfalseChecks the prompt and input images for NSFW content before generating. Off unless set to true

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

Key features of Flux.2 Flex

Manual generation controls

Set steps and guidance for each request. This makes controlled setting tests possible before a team settles on a repeatable setup.

Seed and prompt upsampling

Fix a seed for closer comparisons between runs, or leave it random for more variation. Prompt upsampling can expand a short prompt before generation.

Four output sizes

Choose 0.6, 1, 2, or 4 megapixels. Draft at a smaller size, then use a larger result once the prompt and settings are settled.

Seven aspect ratios

The available shapes run from 21:9 landscape through 1:1 square to 9:21 portrait, covering common site, social, presentation, and display layouts.

Multi-image references

Add reference image URLs to guide the subject, layout, or visual direction without moving to a separate model page.

What Flux.2 Flex is best for

  • Look development

    Compare steps and guidance values while keeping the prompt and seed stable.

  • Concept art

    Test several visual directions before choosing a final setup.

  • Reference-led images

    Use product shots, layouts, or mood boards as input references.

  • Repeatable tests

    Fix the seed when comparing one setting or prompt change at a time.

Flux.2 Flex variants

Flux.2 Flex shares its core image inputs with Pro and Max. The main difference is the amount of control exposed for each request.

Flex

Use Flex when steps, guidance, seed, or prompt upsampling are part of the test. It is the family member for setting sweeps and repeatable comparisons.

Pro

Use Pro for standard image jobs that do not need manual diffusion settings. It keeps the shared aspect-ratio, output-size, and reference-image choices.

Max

Use Max for final image work where the model's highest output setting matters more than manual control.

Flux.2 Flex use cases

For concept art, keep the prompt and seed fixed while changing steps or guidance, then compare the results against the same brief. For a product campaign, attach approved product shots and generate the required landscape, square, and portrait crops from one visual direction. A design team can start at 0.6 or 1 megapixel while testing ideas, then move the chosen setup to 2 or 4 megapixels. The same controls also fit repeatable QA: change one prompt phrase or one setting per run, record the result, and keep the request that best matches the target.

Câu hỏi thường gặp

Câu hỏi thường gặp về Flux.2 Flex

Flux.2 Flex is the adjustable model in the Flux.2 family. It adds steps, guidance, seed, and prompt upsampling controls to the shared image-generation inputs.

Image tasks for Flux.2 Flex post to https://api.unifically.com/v1/tasks with black-forest-labs/flux.2-flex, authorized by a key from the API keys page in the bearer header. A first request needs only a prompt, and billing is per image.

Set prompt in input, then tune aspect_ratio, resolution (0.6mp to 4mp), guidance, steps, seed and optional reference image_urls. Poll /v1/tasks/{task_id} or pass a callback URL; the finished task carries the image URL.

The API offers 0.6, 1, 2, and 4 megapixel output across seven aspect ratios, from 21:9 landscape to 9:21 portrait.

Yes. A request can include several reference image URLs to guide the subject, layout, or visual direction.

Use a fixed seed when you need to compare prompt or setting changes against a more consistent starting point. A random seed is better when you want wider variation.

Use Pro when you do not need manual steps or guidance controls. It keeps the same core size, ratio, and reference-image options with fewer settings to manage.

Hướng dẫn và so sánh Flux.2 Flex

Xem bảng giá, giới hạn và kết quả thử nghiệm thực tế trước khi chạy mô hình này.