ModelsSupportEnterpriseBlog
500+ AI Model API, All In One API.Just In CometAPI
Models API
Developer
Quick StartDocumentationAPI Dashboard
Resources
AI ModelsBlogEnterpriseChangelogAbout
2025 CometAPI. All right reserved.Privacy PolicyTerms of Service
Home/Models/Flux/FLUX 2 FLEX
F

FLUX 2 FLEX

Per Request:$0.008
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
Playground
Overview
Features
Pricing
API

What is FLUX.2 [flex]

FLUX.2 [flex] is the “flexible-control” variant in Black Forest Labs’ FLUX.2 family: a production-minded text→image and image-editing model that exposes tunable inference parameters (steps, guidance scale, seed) so developers trade speed for fidelity and dial typography / fine-detail behavior precisely. Flex supports multi-reference editing (up to 10 reference images in the Flex tier), edits up to ~4 megapixels.


What FLUX.2 [flex] is good for

  • Precise control over quality vs. speed (user selects inference steps and guidance scale).
  • Superior text/typography rendering relative to many contemporaries — recommended for posters, UI mockups, infographics.
  • Multi-reference editing: combine and preserve identity/brand elements across up to 10 input images (Flex), with coherent lighting and materials.
  • High native resolution & editing: up to 4MP output; recommended operational envelope ≤2MP for most workflows.
  • Structured prompts supported: JSON or natural-language prompts; “prompt upsampling” can enrich short prompts automatically.

How FLUX.2 [flex] compares to peers

Short table (summary):

  • Nano Banana Pro (Google / internal names; high-fidelity competitor): similar raw fidelity at high resolutions; Nano Banana targets larger outputs in some provider builds; user comparisons show comparable photorealism but different strengths in prompt behavior and editing consistency.
  • Qwen-Image / Hunyuan Image: FLUX.2 reported stronger subjective win rates in the launch comparisons on text→image and editing multi-reference tasks (see launch coverage).
  • Midjourney / Commercial SaaS: Midjourney often uses upscaling pipelines to compete on final pixel count; FLUX.2 emphasizes native high-resolution output and tighter multi-reference editing. Independent reviewers see trade-offs in compositional style and native pixel detail.

Practical takeaway: FLUX.2’s selling points are multi-reference editing, robust typography, and a family of endpoints that let teams pick a throughput/quality/cost compromise. Independent testers find it competitive with the top models in the same release window.

[flex] only parameters:

ParameterTypeDefaultDescription
stepsinteger50[flex only] Number of inference steps. Maximum: 50, default: 50. Higher = more detail, slower.
guidancefloat4.5[flex only] Guidance scale. Controls how closely the output follows the prompt. Minimum: 1.5, maximum: 10, default: 4.5. Higher = closer prompt adherence.

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 “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. base url is flux generate image(https://api.cometapi.com/flux/v1/flux-2-flex)

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

After generation, you can use the /flux/v1/get_result endpoint to query generated images or monitor process status.. After processing, the API responds with the task status and output data.

👇 Start Building Now Flux image generation – API Doc

FAQ

What makes FLUX.2 [flex] different from other FLUX.2 models?

FLUX.2 [flex] is specialized for typography and text rendering, making it the best choice for preserving small details and generating text-heavy content.

Does FLUX.2 [flex] support adjustable generation steps?

Yes, FLUX.2 [flex] offers 'Quality with control' by allowing adjustable usage of steps and guidance, unlike the standard settings in [pro] and [max].

How many reference images can FLUX.2 [flex] handle?

Like the other FLUX.2 models, [flex] supports up to 8 reference images via the API (10 in Playground) for multi-reference generation.

What is the pricing for FLUX.2 [flex]?

FLUX.2 [flex] is priced at $0.06 per megapixel (MP), positioning it between the [pro] and [max] models.

Is FLUX.2 [flex] suitable for photo editing?

Yes, FLUX.2 [flex] combines powerful editing capabilities with its text specialization, allowing for changes to objects, colors, and adding text overlays sequentially.

What resolution does FLUX.2 [flex] support?

FLUX.2 [flex] supports high-resolution output up to 4 megapixels (4MP) across any aspect ratio, suitable for professional creative work.

When should I choose [flex] over [pro]?

Choose FLUX.2 [flex] when your project involves significant text elements, typography, or requires fine-grained control over generation steps that [pro] does not offer.

Features for FLUX 2 FLEX

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

Pricing for FLUX 2 FLEX

Explore competitive pricing for 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 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.008
Per Request:$0.01
-20%

Sample code and API for FLUX 2 FLEX

FLUX.2 Flex is the mid-tier, developer-focused member of Black Forest Labs’ FLUX.2 image-generation family. It exposes generation parameters (notably number of sampling steps and guidance scale) so developers can trade off latency vs. text/typography fidelity and image detail.
POST
/flux/v1/{model}
Python
JavaScript
Curl
import os
import requests

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"

# API endpoint for FLUX.2 [flex]
url = "https://api.cometapi.com/flux/v1/flux-2-flex"

# Request headers
headers = {
    "Authorization": COMETAPI_KEY,
    "Content-Type": "application/json",
    "Accept": "*/*",
}

# Request payload with all available parameters
# See: https://docs.bfl.ml/api-reference/models/generate-or-edit-an-image-with-flux2-[flex]
payload = {
    # Required: Text prompt for image generation
    "prompt": "A futuristic cyberpunk cityscape at sunset, neon signs with readable text 'WELCOME TO 2077', flying cars, ultra detailed, 8k",
    # Optional: Enable prompt upsampling for enhanced details (default: true)
    "prompt_upsampling": True,
    # Output dimensions (multiple of 16, min 64, max 4MP total)
    "width": 1920,
    "height": 1080,
    # FLEX-specific: Number of inference steps (1-50, default: 50)
    # Higher values produce more detailed images but take longer
    "steps": 50,
    # FLEX-specific: Guidance scale (1.5-10, default: 5)
    # Higher values improve prompt adherence at cost of reduced realism
    "guidance": 5.0,
    # Seed for reproducible results (optional)
    "seed": 42,
    # Moderation level: 0 (strict) to 5 (permissive), default: 2
    "safety_tolerance": 2,
    # Output format: "jpeg" or "png"
    "output_format": "jpeg",
}

# Submit the generation task
print("Submitting FLUX.2 [flex] image generation task...")
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"Cost: {result.get('cost')} credits")
print(f"Output Megapixels: {result.get('output_mp')}")

Python Code Example

import os
import requests

# Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
COMETAPI_KEY = os.environ.get("COMETAPI_KEY") or "<YOUR_COMETAPI_KEY>"

# API endpoint for FLUX.2 [flex]
url = "https://api.cometapi.com/flux/v1/flux-2-flex"

# Request headers
headers = {
    "Authorization": COMETAPI_KEY,
    "Content-Type": "application/json",
    "Accept": "*/*",
}

# Request payload with all available parameters
# See: https://docs.bfl.ml/api-reference/models/generate-or-edit-an-image-with-flux2-[flex]
payload = {
    # Required: Text prompt for image generation
    "prompt": "A futuristic cyberpunk cityscape at sunset, neon signs with readable text 'WELCOME TO 2077', flying cars, ultra detailed, 8k",
    # Optional: Enable prompt upsampling for enhanced details (default: true)
    "prompt_upsampling": True,
    # Output dimensions (multiple of 16, min 64, max 4MP total)
    "width": 1920,
    "height": 1080,
    # FLEX-specific: Number of inference steps (1-50, default: 50)
    # Higher values produce more detailed images but take longer
    "steps": 50,
    # FLEX-specific: Guidance scale (1.5-10, default: 5)
    # Higher values improve prompt adherence at cost of reduced realism
    "guidance": 5.0,
    # Seed for reproducible results (optional)
    "seed": 42,
    # Moderation level: 0 (strict) to 5 (permissive), default: 2
    "safety_tolerance": 2,
    # Output format: "jpeg" or "png"
    "output_format": "jpeg",
}

# Submit the generation task
print("Submitting FLUX.2 [flex] image generation task...")
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"Cost: {result.get('cost')} credits")
print(f"Output Megapixels: {result.get('output_mp')}")

JavaScript Code Example

// Get your CometAPI key from https://api.cometapi.com/console/token, and paste it here
const COMETAPI_KEY = process.env.COMETAPI_KEY || "<YOUR_COMETAPI_KEY>";

// API endpoint for FLUX.2 [flex]
const url = "https://api.cometapi.com/flux/v1/flux-2-flex";

// Request payload with all available parameters
// See: https://docs.bfl.ml/api-reference/models/generate-or-edit-an-image-with-flux2-[flex]
const payload = {
    // Required: Text prompt for image generation
    prompt: "A futuristic cyberpunk cityscape at sunset, neon signs with readable text 'WELCOME TO 2077', flying cars, ultra detailed, 8k",
    
    // Optional: Enable prompt upsampling for enhanced details (default: true)
    prompt_upsampling: true,
    
    // Output dimensions (multiple of 16, min 64, max 4MP total)
    width: 1920,
    height: 1080,
    
    // FLEX-specific: Number of inference steps (1-50, default: 50)
    // Higher values produce more detailed images but take longer
    steps: 50,
    
    // FLEX-specific: Guidance scale (1.5-10, default: 5)
    // Higher values improve prompt adherence at cost of reduced realism
    guidance: 5.0,
    
    // Seed for reproducible results (optional)
    seed: 42,
    
    // Moderation level: 0 (strict) to 5 (permissive), default: 2
    safety_tolerance: 2,
    
    // Output format: "jpeg" or "png"
    output_format: "jpeg"
};

// Submit the generation task
console.log("Submitting FLUX.2 [flex] image generation task...");

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

const result = await response.json();

console.log(`Status Code: ${response.status}`);
console.log(`Task ID: ${result.id}`);
console.log(`Cost: ${result.cost} credits`);
console.log(`Output Megapixels: ${result.output_mp}`);

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/flux/v1/flux-2-flex' \
--header "Authorization: $COMETAPI_KEY" \
--header 'Content-Type: application/json' \
--header 'Accept: */*' \
--data-raw '{
    "prompt": "A futuristic cyberpunk cityscape at sunset, neon signs with readable text WELCOME TO 2077, flying cars, ultra detailed, 8k",
    "prompt_upsampling": true,
    "width": 1920,
    "height": 1080,
    "steps": 50,
    "guidance": 5.0,
    "seed": 42,
    "safety_tolerance": 2,
    "output_format": "jpeg"
}'

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] is the flagship, highest-quality variant of the FLUX.2 family from Black Forest Labs (BFL). It is positioned as a professional-grade text→image generation and image-editing model that focuses on maximal fidelity, prompt adherence, and editing consistency across characters, objects, lighting and color. BFL and partner registries describe FLUX.2 [max] as the top-tier FLUX.2 variant with features for multi-reference editing, grounded generation.
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 is ByteDance/Seed’s multimodal image model (text→image + image editing) that focuses on production-grade image fidelity, stronger prompt adherence, and much-improved editing consistency (subject preservation, text/typography rendering, and facial realism).

Related Blog

How to Use Flux.2 API? All You Need to Know
Nov 27, 2025
flux-2
flux-2-dev
flux-2-flex
flux-2-pro

How to Use Flux.2 API? All You Need to Know

FLUX.2 is Black Forest Labs’ second-generation family of image-generation and image-editing models (released Nov 25, 2025). It offers production-grade
Flux.2 Flex API
Nov 26, 2025
flux-2
flux-2-flex

Flux.2 Flex API

FLUX.2 Flex is the mid-tier, developer-focused member of Black Forest Labs’ FLUX.2 image-generation family. It exposes generation parameters (notably number of sampling steps and guidance scale) so developers can trade off latency vs. text/typography fidelity and image detail.
What is Flux.2 and Flux 2 is now available on CometAPI
Nov 26, 2025
flux-2
flux-2-dev
flux-2-flex
flux-2-pro

What is Flux.2 and Flux 2 is now available on CometAPI

FLUX.2 is a newly announced family of image-generation and editing models from Black Forest Labs that offer production-grade fidelity, multi-reference editing