Black Forest Labs: FLUX.2 Max
FLUX.2 [max] is Black Forest Labs’ image model for demanding final assets and consistent edits. Its documented profile combines visual references, detailed scene control and web grounding for current subjects, with up to 4-megapixel output.
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 [max] is Black Forest Labs’ top-quality member of the FLUX.2 image-generation and editing family. The manufacturer positions it for demanding final assets, strong adherence to a complex brief and consistency across edits. It creates an image from a written description or uses supplied images as visual references. Its distinguishing family capability is grounding search: a request can draw on current information instead of relying only on the scene described in the prompt.
Real-world information and the visual brief
The maker documents web search for subjects such as current weather, a recent sporting event or a historical setting. Identify the actual location, event and time relevant to the picture, then describe the artistic treatment separately. A grounded weather-card concept could specify the city, which condition to visualize, the exact title and the layout. Search informs the generation; an attractive illustration still needs its visible facts checked against the relevant source before becoming a factual communication.
This search capability belongs to [max] in the published FLUX.2 comparison. The other named members have their own roles: [pro] for production, [flex] for adjustable sampling and typography, and [klein] for compact interactive generation. Keep the selected model name with the result so a later revision does not silently replace the groundable profile with a different edition.
References for demanding edits
The documented request profile takes up to eight reference images; the maker’s interactive interface separately allows ten. Assign a role to each reference, such as character appearance, product design, clothing, room or visual style. A composition can combine the chair from one picture with the room from another while keeping the chair’s silhouette and material. For an existing scene, identify the object to change and the details to retain, including light direction and surrounding geometry.
The family’s examples include background changes, replacement of objects, furniture compositions, text edits and consistent characters. An original final-asset brief might place a supplied watch on dark folded fabric, retain the dial and strap design, and change only the lighting to a soft side-lit treatment. Name which source supplies each feature and review the resulting dial, markings, material and reflections together. A preservation instruction establishes the goal; the returned picture is the evidence to compare with it.
Text, colors and prompt interpretation
The FLUX.2 guide recommends a subject–action–style–context structure, with important elements first. It suggests 10–30 words for quick concepts, 30–80 for ordinary projects and longer descriptions for a complex scene. These are writing recommendations, not hard context limits. Natural language and JSON-structured scene descriptions are both documented ways to organize subjects, placement, light and style. A structured prompt is an image brief rather than a promise of a structured textual response.
For visible lettering, quote the wording, specify its position and describe the typographic hierarchy. Associate each hexadecimal color with a particular object or text element; a color code without a named target is ambiguous. The maker guide uses positive descriptions instead of a negative-prompt mechanism. For a product scene with empty space for a headline, describe that empty area and its intended position directly.
The exact [max] request specification applies prompt upsampling by default. Its disable_pup control turns that expansion off when a carefully written brief should be used as supplied. This is distinct from a claim that every word will appear unchanged in the final image. Preserve the actual brief and selected setting with the result when assessing whether an unexpected visual decision came from the instruction or its interpretation.
Output and a useful final asset
The family guide documents images up to 4 megapixels, with explicit dimensions at least 64×64 and multiples of 16. Up to 2 megapixels is its ordinary-use recommendation. The exact [max] profile lists JPEG, PNG and WebP, with JPEG as the default, and an optional random seed. Choose the output shape for the intended placement before arranging the composition. The model’s image generation is separate from resizing an already finished asset.
Retain the image, references, prompt, dimensions and model identity when selecting the final version. The producer’s FLUX.2 guide warns that its signed result link is temporary, with a ten-minute retrieval window. Inspect fine text, object identity, layout, light and any facts drawn from search at the intended display size. The useful artifact is the chosen visual with enough context to continue an exact revision, rather than a scene whose important details have never been compared with the brief.
Ailoot Ultra · Images POST /v1/images/generations black-forest-labs/flux.2-max
black-forest-labs/flux.2-maxOverview
FLUX.2 [max] is Black Forest Labs’ image model for demanding final assets and consistent edits. Its documented profile combines visual references, detailed scene control and web grounding for current subjects, with up to 4-megapixel output.
- 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 |
|---|---|---|---|---|
Fieldmodel | Typestring | RequirementRequired | Values & limits black-forest-labs/flux.2-max | Default— |
Fieldprompt | Typestring | RequirementRequired | Values & limits Minimum length: 1 | Default— |
Fieldaspect_ratio | Typestring | RequirementOptional | Values & limits 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, auto | Default— |
Fieldoutput_format | Typestring | RequirementOptional | Values & limits png, jpeg | Default— |
Fieldn | Typeinteger | RequirementOptional | Values & limits Minimum: 1 Maximum: 1 | Default— |
Fieldinput_references | Typearray | RequirementOptional | Values & limits Minimum items: 0 Maximum items: 8 | Default— |
Fieldprovider | Typeobject | RequirementOptional | Values & limits | Default— |
Method parameters and lifecycle
| Parameter | Contract |
|---|---|
Parametercontent_type | Contractapplication/json |
Parameterrequired | Contractmodel, prompt |
Parametermaterial_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 |
| Configurationoutput image megapixel | Rate schedule— | Forecast quantity— | Billing unitper output image megapixel | Charge Output · output image megapixel · Estimate for comparison only $0.14 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.14 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 →
Example requests
Ailoot Ultra · Images
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-max', '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}/contentGET /v1/media/assetsGET /v1/media/assets/{asset_id}
Other content reads
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 |
|---|---|
Fieldcreated | Type |
Fielddata[].url | Type |
Fielddata[].b64_json | Type |
Fieldusage | Type |
Aliases
Model aliases
Ailoot Ultra black-forest-labs/flux.2-max
Method path aliases
/v1/images
Related caller IDs
FAQ · Black Forest Labs: FLUX.2 Max
- What inputs and results are available?
POST /v1/images/generations·black-forest-labs/flux.2-max:text,image→image- Which fields does the request use?
POST /v1/images/generations·black-forest-labs/flux.2-max:model,prompt,aspect_ratio,output_format,n,input_references,provider- What limits apply?
POST /v1/images/generations·black-forest-labs/flux.2-max:n.minimum:1;n.maximum:1