ModelsPricingEnterprise
500+ AI Model API, All In One API.Just In CometAPI
Models API
Developer
Quick StartDocumentationAPI Dashboard
Company
About usEnterprise
Resources
AI ModelsBlogChangelogSupport
Terms of ServicePrivacy Policy
© 2026 CometAPI · All rights reserved
Home/Models/Replicate/Black Forest Labs/FLUX 2 FLEX
R

Black Forest Labs/FLUX 2 FLEX

Per Request:$0.192
FLUX 2 FLEX is the versatile, adaptable model designed for flexible deployment across various use cases and hardware configurations. It offers scalable performance with adjustable quality settings, making it ideal for applications requiring dynamic resource allocation. This model provides the best balance between quality, speed, and resource efficiency.
New
Commercial Use
Overview
Features
Pricing
API

What is FLUX.2 Flex

FLUX.2 is the “flexible” (managed API) member of the FLUX.2 product family from Black Forest Labs. It is designed for developers and creative teams who need:

  • explicit control over generation parameters (inference steps, guidance scale, etc.) so they can trade speed for fidelity during iterative workflows;
  • robust typography / text rendering and very fine detail handling (infographics, UI mockups, product labels); and
  • reliable multi-reference editing (combine elements across several photos while maintaining identity/consistency).

FLUX.2 is offered as multiple product variants (Pro, Flex, Dev, Klein) that target different usage patterns — Flex sits between Pro (highest quality + fixed latency) and Dev (open-weight checkpoint for research/local use).

Key features (what FLUX.2 Flex brings to the table)

  • Controllable generation: explicit parameters (steps, guidance scale) to balance speed vs. prompt fidelity.
  • High-resolution output: capable of production outputs up to 4 megapixels (4MP) while preserving detail.
  • Multi-reference inputs: accepts multiple reference images (Flex supports up to 10 reference images; Dev/Pro numbers vary by tier). This enables consistent character/product renderings across outputs.
  • Improved typography and text rendering: BFL emphasizes substantially improved rendering of glyphs, kerning and multi-line layouts — making FLUX.2 attractive for UI, packaging and infographics.
  • Managed API with megapixel pricing (predictable cost model): pricing for Flex uses a per-megapixel model (see Pricing section).

Technical details of FLUX.2 Flex

Core architecture: FLUX.2 uses a latent flow-matching backbone (flow transformer) combined with a vision-language model (BFL states it couples a Mistral-3 24B VLM with a rectified flow transformer). The VAE used by FLUX.2 was re-trained to improve the learnability/quality/compression tradeoff. These choices help with world knowledge, compositional logic and tighter prompt adherence.

FLUX.2 : typical generation times reported ~22 s (text-only) and ~40 s (with input image), accepts up to 10 inputs and is priced around $0.048 per megapixel (input + output combined) on CometAPI.

Model name: black-forest-labs/flux-2-flex

Input constraints: Flex accepts multiple inputs (up to 10 inputs in the managed offering) and a total input megapixel limit is enforced (quote a 14MP maximum aggregated input ). Output resolution beyond 4MP is typically downsampled or limited by the service.

Benchmark performance of FLUX.2 Flex

Human-style win-rate evaluation (vendor benchmark): In BFL’s published head-to-head tests, FLUX.2 variants (notably ) showed strong win rates vs. contemporary open models: ~66.6% win rate in text-to-image, 59.8% in single-reference editing and 63.6% in multi-reference editing vs. other open models cited. BFL also presented an ELO vs. per-image cost chart placing FLUX.2 variants in the ~1030–1050 ELO band at per-image costs in the 2–6 cent range .

Limitations of FLUX.2 Flex

  • Cost scaling with references / resolution: Flex uses per-megapixel pricing. Adding multiple reference images or raising output resolution increases cost linearly under the advertised megapixel model . For workflows that iterate with many references, cost can accumulate quickly.
  • Prompt/consistency failure modes: Although FLUX.2 improves character consistency, complex multi-attribute prompts can still produce failures (artifacts, unexpected blending, or pose/identity drift) depending on prompt design and number of references.
  • Content & safety: While BFL reports strong resilience in moderation/violative-input tests, image models are not perfect; risks remain for generating copyrighted material, impersonation, or unsafe content.

Typical / recommended use cases

  • Ad and marketing image variants where the same model/actor/product must remain consistent across many scenes or backgrounds (multi-reference consistency).
  • Product photography & virtual try-on (preserve product details across backgrounds).
  • Editorial/fashion spreads requiring the same identity across many shots.
  • Rapid prototyping and research (dev checkpoint allows experimentation, fine-tuning and LoRA/adapter workflows).

How to access Flux.2 Flex API

Step 1: Sign Up for API Key

Log in to cometapi.com. If you are not our user yet, please register first. Sign into your CometAPI console. Get the access credential API key of the interface. Click “Add Token” at the API token in the personal center, get the token key: sk-xxxxx and submit.

Step 2: Send Requests to Flux.2 Flex API

Select the “black-forest-labs/flux-2-flex ”endpoint to send the API request and set the request body. The request method and request body are obtained from our website API doc. Our website also provides Apifox test for your convenience. Replace <YOUR_API_KEY> with your actual CometAPI key from your account.

Insert your question or request into the content field—this is what the model will respond to . Process the API response to get the generated answer.

Step 3: Retrieve and Verify Results

Process the API response to get the generated answer. After processing, the API responds with the task status and output data.

CometAPI Now Supporting Replicate Format Models: 🔹 black-forest-labs/flux-2-pro 🔹 black-forest-labs/flux-2-dev 🔹 black-forest-labs/flux-2-flex

Limited Time Promotion: Lower than Replicate Official Pricing!

👇 Start Building Now Create Predictions – API Doc

⚡ Flexible Selection:

  • Pro: Designed for high-efficiency production and fast delivery.
  • Flex: Maximizes image quality with adjustable parameters.
  • Dev: Developer-friendly optimization.

Features for Black Forest Labs/FLUX 2 FLEX

Explore the key features of Black Forest Labs/FLUX 2 FLEX, designed to enhance performance and usability. Discover how these capabilities can benefit your projects and improve user experience.

Pricing for Black Forest Labs/FLUX 2 FLEX

Explore competitive pricing for Black Forest Labs/FLUX 2 FLEX, designed to fit various budgets and usage needs. Our flexible plans ensure you only pay for what you use, making it easy to scale as your requirements grow. Discover how Black Forest Labs/FLUX 2 FLEX can enhance your projects while keeping costs manageable.
Comet Price (USD / M Tokens)Official Price (USD / M Tokens)Discount
Per Request:$0.192
Per Request:$0.24
-20%

Sample code and API for Black Forest Labs/FLUX 2 FLEX

Access comprehensive sample code and API resources for Black Forest Labs/FLUX 2 FLEX to streamline your integration process. Our detailed documentation provides step-by-step guidance, helping you leverage the full potential of Black Forest Labs/FLUX 2 FLEX in your projects.
Python
JavaScript
Curl
import os
import requests

COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"

url = "https://api.cometapi.com/replicate/v1/models/black-forest-labs/flux-2-flex/predictions"

headers = {
    "Authorization": f"Bearer {COMETAPI_KEY}",
    "Content-Type": "application/json"
}

payload = {
    "input": {
        "prompt": "Fluffy cotton candy sculpted into voluminous 3D letters spelling 'FLEX' in swirls of bubblegum pink, baby blue, and soft lavender, held on a wooden stick in front of a vintage pastel cotton candy cart. Shot on Kodak Portra 160, bright midday summer sunlight, the spun sugar texture catching light with wispy translucent edges",
        "input_images": [
            "https://replicate.delivery/xezq/Q9jOVfT4nmT6YaUGe7fwMe85kYPNziFq18j850Sg6YvPlk0WB/tmpzq6ncmxa.jpg"
        ],
        "aspect_ratio": "16:9",
        "resolution": "2 MP",
        "steps": 30,
        "guidance": 4.5,
        "prompt_upsampling": True,
        "output_format": "jpg",
        "output_quality": 90,
        "safety_tolerance": 2,
        "seed": 42
    }
}

response = requests.post(url, headers=headers, json=payload)
result = response.json()

print(f"Status Code: {response.status_code}")
print(f"Task ID: {result.get('id')}")
print(f"Status: {result.get('status')}")
print(f"Model: {result.get('model')}")

Python Code Example

import os
import requests

COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"

url = "https://api.cometapi.com/replicate/v1/models/black-forest-labs/flux-2-flex/predictions"

headers = {
    "Authorization": f"Bearer {COMETAPI_KEY}",
    "Content-Type": "application/json"
}

payload = {
    "input": {
        "prompt": "Fluffy cotton candy sculpted into voluminous 3D letters spelling 'FLEX' in swirls of bubblegum pink, baby blue, and soft lavender, held on a wooden stick in front of a vintage pastel cotton candy cart. Shot on Kodak Portra 160, bright midday summer sunlight, the spun sugar texture catching light with wispy translucent edges",
        "input_images": [
            "https://replicate.delivery/xezq/Q9jOVfT4nmT6YaUGe7fwMe85kYPNziFq18j850Sg6YvPlk0WB/tmpzq6ncmxa.jpg"
        ],
        "aspect_ratio": "16:9",
        "resolution": "2 MP",
        "steps": 30,
        "guidance": 4.5,
        "prompt_upsampling": True,
        "output_format": "jpg",
        "output_quality": 90,
        "safety_tolerance": 2,
        "seed": 42
    }
}

response = requests.post(url, headers=headers, json=payload)
result = response.json()

print(f"Status Code: {response.status_code}")
print(f"Task ID: {result.get('id')}")
print(f"Status: {result.get('status')}")
print(f"Model: {result.get('model')}")

JavaScript Code Example

const COMETAPI_KEY = process.env.COMETAPI_KEY || "<YOUR_COMETAPI_KEY>";

const url = "https://api.cometapi.com/replicate/v1/models/black-forest-labs/flux-2-flex/predictions";

const payload = {
    input: {
        prompt: "Fluffy cotton candy sculpted into voluminous 3D letters spelling 'FLEX' in swirls of bubblegum pink, baby blue, and soft lavender, held on a wooden stick in front of a vintage pastel cotton candy cart. Shot on Kodak Portra 160, bright midday summer sunlight, the spun sugar texture catching light with wispy translucent edges",
        input_images: [
            "https://replicate.delivery/xezq/Q9jOVfT4nmT6YaUGe7fwMe85kYPNziFq18j850Sg6YvPlk0WB/tmpzq6ncmxa.jpg"
        ],
        aspect_ratio: "16:9",
        resolution: "2 MP",
        steps: 30,
        guidance: 4.5,
        prompt_upsampling: true,
        output_format: "jpg",
        output_quality: 90,
        safety_tolerance: 2,
        seed: 42
    }
};

const response = await fetch(url, {
    method: "POST",
    headers: {
        "Authorization": `Bearer ${COMETAPI_KEY}`,
        "Content-Type": "application/json"
    },
    body: JSON.stringify(payload)
});

const result = await response.json();

console.log(`Status Code: ${response.status}`);
console.log(`Task ID: ${result.id}`);
console.log(`Status: ${result.status}`);
console.log(`Model: ${result.model}`);

Curl Code Example

#!/bin/bash
# Get your CometAPI key from https://api.cometapi.com/console/token
# Export it as: export COMETAPI_KEY="your-key-here"

curl --location --request POST 'https://api.cometapi.com/replicate/v1/models/black-forest-labs/flux-2-flex/predictions' \
--header "Authorization: Bearer $COMETAPI_KEY" \
--header 'Content-Type: application/json' \
--data-raw '{
    "input": {
        "prompt": "Fluffy cotton candy sculpted into voluminous 3D letters spelling FLEX in swirls of bubblegum pink, baby blue, and soft lavender, held on a wooden stick in front of a vintage pastel cotton candy cart. Shot on Kodak Portra 160, bright midday summer sunlight, the spun sugar texture catching light with wispy translucent edges",
        "input_images": [
            "https://replicate.delivery/xezq/Q9jOVfT4nmT6YaUGe7fwMe85kYPNziFq18j850Sg6YvPlk0WB/tmpzq6ncmxa.jpg"
        ],
        "aspect_ratio": "16:9",
        "resolution": "2 MP",
        "steps": 30,
        "guidance": 4.5,
        "prompt_upsampling": true,
        "output_format": "jpg",
        "output_quality": 90,
        "safety_tolerance": 2,
        "seed": 42
    }
}'

More Models

G

Nano Banana 2

Input:$0.4/M
Output:$2.4/M
Core Capabilities Overview: Resolution: Up to 4K (4096×4096), on par with Pro. Reference Image Consistency: Up to 14 reference images (10 objects + 4 characters), maintaining style/character consistency. Extreme Aspect Ratios: New 1:4, 4:1, 1:8, 8:1 ratios added, suitable for long images, posters, and banners. Text Rendering: Advanced text generation, suitable for infographics and marketing poster layouts. Search Enhancement: Integrated Google Search + Image Search. Grounding: Built-in thinking process; complex prompts are reasoned before generation.
D

Doubao Seedream 5

Per Request:$0.028
Seedream 5.0 Lite is a unified multimodal image generation model endowed with deep thinking andonline search capabilities, featuring an all-round upgrade in its understanding, reasoning and generationcapabilities.
F

FLUX 2 MAX

Per Request:$0.008
FLUX.2 [max] is a top-tier visual-intelligence model from Black Forest Labs (BFL) designed for production workflows: marketing, product photography, e-commerce, creative pipelines, and any application that requires consistent character/product identity, accurate text rendering, and photoreal detail at multi-megapixel resolutions. The architecture is engineered for strong prompt-following, multi-reference fusion (up to ten input images), and grounded generation (ability to incorporate up-to-date web context when producing images).
X

Black Forest Labs/FLUX 2 MAX

Per Request:$0.056
FLUX.2 [max] er flagskibet og den variant med den højeste kvalitet i FLUX.2-familien fra Black Forest Labs (BFL). Den er positioneret som en professionel model til tekst-til-billede-generering og billedredigering, der fokuserer på maksimal billedtrofasthed, prompt-efterlevelse og konsistens i redigering på tværs af personer, objekter, belysning og farver. BFL og partnerregistre beskriver FLUX.2 [max] som topvarianten i FLUX.2-familien med funktioner til redigering med flere referencer og forankret generering.
O

GPT Image 1.5

Input:$6.4/M
Output:$25.6/M
GPT-Image-1.5 is OpenAI’s image model in the GPT Image family . It is a natively multimodal GPT model designed to generate images from text prompts and to perform high-fidelity edits of input images while following user instructions closely.
D

Doubao Seedream 4.5

Per Request:$0.032
Seedream 4.5 是 ByteDance/Seed 的多模态图像模型(文本→图像 + 图像编辑),专注于生产级图像保真度、更强的提示词遵从性,以及大幅提升的编辑一致性(主体保留、文本/排版渲染和面部真实感)。