Diperbarui
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 ID | black-forest-labs/flux.2-flex |
| Endpoint | POST https://api.unifically.com/v1/tasks |
| Request types | Text-to-image, image generation with reference images |
| Output size | 0.6, 1, 2, or 4 megapixels |
| Aspect ratio | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, 9:21 |
| Reference inputs | Image URLs in image_urls |
| Controls | Steps, 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
- Create an API key on the API keys page.
- Send a POST request to
/v1/taskswith the model ID and aninputobject. - Read the
task_idfrom 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
| Parameter | Type | Default | What it does |
|---|---|---|---|
prompt | string | required | Text description of the image |
aspect_ratio | string | 16:9 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16, or 9:21 |
resolution | string | 1mp | 0.6mp, 1mp, 2mp, or 4mp |
image_urls | string[] | none | Reference image URLs |
guidance | float | none | Guidance scale, for example 1.5 |
steps | integer | none | Number of generation steps |
seed | integer | random | Seed for reproducible results |
prompt_upsampling | boolean | true | Expands the prompt before generation for more creative output |
nsfw_check | boolean | false | Checks 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.
FAQ
Pertanyaan yang sering diajukan tentang 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.
Panduan dan perbandingan Flux.2 Flex
Tinjau harga, batasan, dan hasil pengujian sebelum menjalankan model ini.
Model yang mirip dengan Flux.2 Flex
Jelajahi semua model
API Flux.2 Pro
Balanced production runs, 7 aspect ratios, 0.6-4 MP, up to 10 reference images.
- Teks ke Gambar
- Gambar ke Gambar

API Flux.2 Max
Maximum quality Flux.2 output, 7 aspect ratios, 0.6-4 MP, up to 10 reference images.
- Teks ke Gambar
- Gambar ke Gambar

API Flux.2 Klein 9B
9B Flux.2 Klein, 7 aspect ratios up to 4MP, reference image support.
- Teks ke Gambar
- Gambar ke Gambar

API Flux.2 Klein 4B
4B Flux.2 Klein, smallest in the line, 7 aspect ratios up to 4MP, reference image support.
- Teks ke Gambar
- Gambar ke Gambar
