Source: https://ailoot.ai/models/en/black-forest-labs-flux-2-flex/
Canonical: https://ailoot.ai/models/en/black-forest-labs-flux-2-flex/
Language: en

# Black Forest Labs: FLUX.2 Flex

[Markdown](https://ailoot.ai/models/en/black-forest-labs-flux-2-flex/index.md) · [JSON](https://ailoot.ai/models/en/black-forest-labs-flux-2-flex/facts.json)

## [Black Forest Labs: FLUX.2 Flex](https://ailoot.ai/models/en/black-forest-labs-flux-2-flex/)

FLUX.2 \[flex\] specializes in image typography and small visual details, with adjustable sampling steps and guidance. Use text and image references to develop posters, product layouts or precise revisions while balancing adherence and realism.

- [**Ailoot Ultra · Images** `POST /v1/images/generations` `black-forest-labs/flux.2-flex`](https://ailoot.ai/models/en/black-forest-labs-flux-2-flex/#method-0)

About the model

This description covers the model’s capabilities. Available in Ailoot inputs, outputs and options are listed for the selected method below.

FLUX.2 \[flex\] is Black Forest Labs’ image-generation and editing edition specialized for typography, text rendering and the preservation of small details. It uses written scene instructions and image references to produce an image. Its defining control is adjustable sampling: the documented profile exposes both inference steps and guidance, letting a visual brief be refined through settings as well as words.

#### Lettering and fine details

A typography task should begin with the actual copy. Quote each line, define where it belongs and distinguish headline, supporting text and label. Describe the letter style, scale and color in relation to the scene. An original poster brief might show a cobalt-blue bicycle in a pale studio, with a large title above the frame and a smaller specification line below it. The image must make the product and reading order clear together.

For a detailed product visual, identify the parts that determine whether the result is useful: a dial, control label, seam, material edge or package marking. Supply a readable reference and explain which feature it establishes. A scene that looks generally similar can still change a critical character or component, so compare the generated detail at its intended display size. The model’s specialization is a reason to give exact requirements, not a guarantee that proofreading or visual inspection becomes unnecessary.

#### Steps and guidance serve different purposes

The exact manufacturer profile accepts one to fifty inference steps, with fifty as the default. Its description associates more steps with greater detail and realism. Guidance ranges from 1.5 to 10, with a default of 5. Higher guidance strengthens adherence to the prompt but can reduce realism. An image with exact design instructions and one seeking a natural photographic appearance can therefore call for different choices within that profile.

Keep the wording, references and output shape constant when comparing a setting change. Look at the feature that prompted the change: letterforms, object placement or material texture. Change a setting for a specific visual reason rather than treating a large number as automatically better. These are producer sampling controls; the four-step distilled \[klein\] profile and the standard controls of \[pro\] or \[max\] are different model choices.

Prompt upsampling is enabled by default in the \[flex\] specification and can be disabled through its own prompt\_upsampling control. This allows a detailed brief to remain the supplied text when appropriate. The manufacturer’s shared guide recommends placing the main subject and important action before secondary decoration, and describes JSON-structured prompts alongside natural-language briefs. Use the structure that makes the required relationships easiest to specify.

#### Reference-led revisions

The exact request profile contains eight reference-image positions. The maker’s interactive workflow separately permits up to ten images; those counts describe different interfaces. Define whether a picture supplies the scene to edit, a product, a character, clothing or a style. For a revision, identify the object and the change, then name the surrounding composition, materials or light that should remain.

An original packaging task could use the carton from the first image and the finish from a second, replace the front label with the approved wording, and preserve the carton’s proportions. A group composition can assign a distinct reference to each subject and keep those assignments consistent. The family examples cover object and background changes, compositing, text edits and style transformations. Request one connected revision with a clear target, then compare both the edited region and the parts meant to stay stable.

#### Size, color and the returned image

The FLUX.2 guide documents a minimum of 64×64 pixels, dimensions in multiples of 16 and output up to 4 megapixels, with up to 2 megapixels recommended for ordinary use. The exact \[flex\] specification lists JPEG, PNG and WebP output, defaulting to JPEG. It also provides an optional random seed. Retain the actual model, seed and sampling settings with the source references when comparing versions; a named family alone does not identify the complete generation configuration.

For color-sensitive work, associate each hex code with a named object or text element. For composition, specify the intended aspect ratio through the image dimensions and leave sufficient room for readable lettering. The shared guide has no negative-prompt mechanism, so describe the desired appearance positively: sharp focus, a clean background or a clearly empty area for copy. Its multilingual examples support writing a culturally specific brief in the appropriate language without establishing a fixed language-count guarantee.

The producer’s FLUX.2 flow returns an image after processing and uses temporary signed links with a ten-minute retrieval window. Preserve the actual image and brief together. Check the typography, fine details, reference identity and visual treatment before placing the asset in a layout. The final deliverable can be a selected poster, product image or edited composition with its exact settings retained for the next revision.

**Ailoot Ultra · Images** `POST /v1/images/generations` `black-forest-labs/flux.2-flex`

[`black-forest-labs/flux.2-flex`](https://ailoot.ai/models/en/#m=black-forest-labs%2Fflux.2-flex&route=Ultra&caller=black-forest-labs%2Fflux.2-flex&fmt=images)

Black Forest Labs /`black-forest-labs/flux.2-flex`

### Overview

FLUX.2 \[flex\] specializes in image typography and small visual details, with adjustable sampling steps and guidance. Use text and image references to develop posters, product layouts or precise revisions while balancing adherence and realism.

Accepted inputs

Text · Images

Results

Images

### Available in Ailoot · inputs & methods

**Ailoot Ultra · Images** `POST /v1/images/generations`

Input types

`text`, `image`

Output types

`image`

| Field | Type | Requirement | Values & limits | Default |
| --- | --- | --- | --- | --- |
| Field`model` | Type`string` | RequirementRequired | Values & limits black-forest-labs/flux.2-flex | Default— |
| Field`prompt` | Type`string` | RequirementRequired | Values & limits Minimum length: 1 | Default— |
| Field`aspect_ratio` | Type`string` | RequirementOptional | Values & limits 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, auto | Default— |
| Field`output_format` | Type`string` | RequirementOptional | Values & limits png, jpeg | Default— |
| Field`n` | Type`integer` | RequirementOptional | Values & limits Minimum: 1 Maximum: 1 | Default— |
| Field`input_references` | Type`array` | RequirementOptional | Values & limits Minimum items: 0 Maximum items: 8 | Default— |
| Field`provider` | Type`object` | RequirementOptional | Values & limits | Default— |

Method parameters and lifecycle

| Parameter | Contract |
| --- | --- |
| Parameter`content_type` | Contractapplication/json |
| Parameter`required` | Contractmodel, prompt |
| Parameter`material_types` | Contracttext, image |

Lifecycle: `synchronous_result_then_owned_library`

`GET /v1/media/tasks/{task_id}` · actual returned task\_id or media library record

`GET /v1/media/assets/{asset_id}/content`

`GET /v1/media/assets`

`GET /v1/media/assets/{asset_id}`

### Pricing

##### How the final charge is calculated

The displayed rates estimate the cost before generation. The final charge is calculated from the cost recorded for the original generation. Measured output duration and forecast quantities are not the final billable quantity.

Tariff references do not add request options. Supported parameters are listed for the selected method.

Fast mode

Not specified When fast mode is selected

Flex mode

Not specified When flex mode is selected

Maximum reasoning effort

Not specified When maximum reasoning effort uses the default adjustment

#### Estimated rates for comparison

#### Prices by configuration

Match each charge to the conditions shown. Use one rate for each set of alternative configurations.

| Configuration | Rate schedule | Forecast quantity | Billing unit | Charge |
| --- | --- | --- | --- | --- |
| ConfigurationBase token rates | Rate scheduleBase rate | Forecast quantity— | Billing unit— | Charge Input · Input tokens · Estimate for comparison only **—** / 1K tokens Output · Output tokens · Estimate for comparison only **—** / 1K tokens Input · Cache read · Estimate for comparison only **—** / 1K tokens Input · Cache write · Estimate for comparison only **—** / 1K tokens Input · Cache write, 1 hour · Estimate for comparison only **—** / 1K tokens |
| Configurationinput image megapixel | Rate schedule— | Forecast quantity— | Billing unitper input image megapixel | Charge Input · input image megapixel · Estimate for comparison only **$0.12** per input image megapixel |
| Configurationoutput image megapixel | Rate schedule— | Forecast quantity— | Billing unitper output image megapixel | Charge Output · output image megapixel · Estimate for comparison only **$0.12** per output image megapixel |
| ConfigurationEstimated generation cost | Rate schedule— | Forecast quantityone generation estimate | Billing unit— | Charge Output · Estimated generation cost · Estimate for comparison only **$0.12** estimate before generation This estimate is not an additional charge or a fixed rate for the completed generation. |

Ailoot reserves an estimated amount before a request. After the result, it settles the final charge from measured usage. Streaming settlement uses the final usage record. [How reservation and settlement work →](https://ailoot.ai/docs/en/billing/reserve/)

### Example requests

#### Ailoot Ultra · Images

curl

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
export AILOOT_API_KEY
python3 - <<'PY_REQUEST'
import json,os
from pathlib import Path
p={'model': 'black-forest-labs/flux.2-flex', 'prompt': 'a red panda astronaut floating in space, studio lighting'}

Path("request.json").write_text(json.dumps(p,ensure_ascii=False))
PY_REQUEST
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/images/generations \
  -H "Authorization: Bearer $AILOOT_API_KEY" -H 'Content-Type: application/json' \
  --data-binary @request.json -D response-headers.txt -o result.json
python3 - <<'PY_RESULT'
import base64, json, os, subprocess
from pathlib import Path
from urllib.parse import urlsplit, urljoin

def save_images(items):
    if not items: raise SystemExit("No completed images; retain the full response")
    for index, item in enumerate(items):
        encoded=item.get("b64_json")
        uri=item.get("url", "")
        if not encoded and uri.startswith("data:image/"):
            header, separator, encoded=uri.partition(",")
            if not separator or ";base64" not in header: raise SystemExit("Unsupported image data URI")
        if encoded:
            raw=base64.b64decode(encoded,validate=True)
        elif uri:
            uri=urljoin("https://api.ailoot.ai",uri)
            parsed=urlsplit(uri)
            if parsed.scheme!="https" or not parsed.netloc or parsed.username or parsed.password:
                raise SystemExit("Invalid returned image URL")
            owned=parsed.netloc=="api.ailoot.ai" and parsed.path.startswith("/v1/media/assets/") and parsed.path.endswith("/content")
            args=["curl","--fail-with-body","--silent","--show-error",uri]
            if owned: args += ["-H","Authorization: Bearer "+os.environ["AILOOT_API_KEY"]]
            temporary=Path(f"image-{index}.bin")
            subprocess.run(args+["-o",str(temporary)],check=True)
            raw=temporary.read_bytes()
            temporary.unlink()
        else: raise SystemExit("Image has neither bytes nor URL")
        if not raw: raise SystemExit("Empty image result")
        ext="png" if raw.startswith(b"\x89PNG") else "jpg" if raw.startswith(b"\xff\xd8") else "webp" if raw[:4]==b"RIFF" and raw[8:12]==b"WEBP" else "svg" if raw.lstrip().startswith((b"<svg",b"<?xml")) else "bin"
        Path(f"image-{index}.{ext}").write_bytes(raw)
    print("Every returned image saved; complete response metadata retained")
save_images(json.loads(Path("result.json").read_text())["data"])
PY_RESULT
```

### Receive and save results

#### Ailoot Ultra · Images

Download each returned image or save its Base64 contents

- `GET /v1/media/tasks/{task_id}`
- `GET /v1/media/assets/{asset_id}/content`
- `GET /v1/media/assets`
- `GET /v1/media/assets/{asset_id}`

Other content reads

Read existing owned assets

```bash
set -eu
: "${AILOOT_API_KEY:?Set your Ailoot API key}"
curl --fail-with-body --silent --show-error https://api.ailoot.ai/v1/media/assets \
  -H "Authorization: Bearer $AILOOT_API_KEY" -o owned-assets.json
# Preserve every returned asset and follow its exact signed content URL. Do not construct a signed token.
```

##### Keep all completed results

Save every completed image; retrieve each returned URL or decode its Base64 contents.

Retain the complete response and headers, every actual output, original returned identifiers and all usage fields. Recover the original operation without submitting creation again.

##### If the original response needs checking

Keep the returned X-Client-Request-ID for reconciliation. Read only actual returned task\_id/asset\_id values or the owned media library; never build a task URL from the operation ID and never resubmit creation.

Response fields

| Field | Type |
| --- | --- |
| Field`created` | Type |
| Field`data[].url` | Type |
| Field`data[].b64_json` | Type |
| Field`usage` | Type |

### Aliases

#### Model aliases

**Ailoot Ultra** [`black-forest-labs/flux.2-flex`](https://ailoot.ai/models/en/#m=black-forest-labs%2Fflux.2-flex&route=Ultra&caller=black-forest-labs%2Fflux.2-flex&fmt=images)

#### Method path aliases

`/v1/images`

#### Related caller IDs

[`black-forest-labs/flux.2-flex`](https://ailoot.ai/models/en/#m=black-forest-labs%2Fflux.2-flex&route=Ultra&caller=black-forest-labs%2Fflux.2-flex&fmt=images)

FAQ · Black Forest Labs: FLUX.2 Flex

What inputs and results are available?

`POST /v1/images/generations` · `black-forest-labs/flux.2-flex`: `text`, `image` → `image`

Which fields does the request use?

`POST /v1/images/generations` · `black-forest-labs/flux.2-flex`: `model`, `prompt`, `aspect_ratio`, `output_format`, `n`, `input_references`, `provider`

What limits apply?

`POST /v1/images/generations` · `black-forest-labs/flux.2-flex`: `n.minimum`: `1`; `n.maximum`: `1`

Connect Ailoot to Claude Code, OpenCode, Hermes or your own app.

## The company and its project portfolio

The company and its project portfolio: millions of customers; monthly sales in the billions.

## Buy tokens at a discount.

Subscription discounts for regular use. Promo codes offer up to 50% off token purchases.

Subscription

Choose a discounted plan for your regular requests.

Promo code: up to 50% off

Enter your code at checkout. The price updates to reflect the current promotion.

Spending in your history

The model, tokens and amount are recorded for each request.

[Choose a subscription](https://ailoot.ai/docs/en/billing/subscriptions/) · [View model prices](https://ailoot.ai/models/en/)

## Connect the API to a product you sell.

Use Ailoot in SaaS, apps and bots under its official service offer and licence agreement. Request a reseller licence for resale.

Commercial application

Add text, image, video and audio generation to paid features in your service.

Reseller licence

Send a description of your project and how you provide access. Request written terms for use and resale.

Documents on the website

The service offer, licence agreement and data processing policy are available before you connect.

[Request a reseller licence](mailto:support@ailoot.ai) · [Service offer and licence agreement](https://ailoot.ai/legal/offer?lang=en)

## Ailoot · The company and its project portfolio





Ailoot combines established operating experience, a large client base, stable service and ongoing KPI control.





The company and its project portfolio: millions of customers; monthly sales in the billions.





Ailoot brings that operating experience to API access for AI features in customer products, agents, applications and automations.
