Flux 2 Dev icon

Flux 2 Dev API

Black Forest Labs' open-weight member of the Flux 2 family (Nov 2025), a 32-billion-parameter model you can download and run yourself, positioned as the most capable open-weight image generation and editing model available.

Integrate Flux 2 Dev with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.

model: "flux-2-dev"
Flux 2 Dev photorealistic hero banner of a hiking backpack on a mossy rock in morning mist with soft natural light

What's special about Flux 2 Dev

Open weights you can run yourself

The full model is published on Hugging Face with reference code, so you can generate and edit locally instead of relying only on a hosted API.

Runs on consumer GPUs

Full precision needs data-center hardware, but quantized fp8 and 4-bit builds run on high-end consumer cards like an RTX 4090 through ComfyUI and Diffusers.

A smarter text encoder

It pairs with a Mistral-3 language model and a 32k-token context window, which sharpens prompt accuracy and handles long, detailed instructions.

Multi-reference editing in one checkpoint

Generation and image editing with multiple reference images live in a single model, keeping characters, style, and branding consistent.

Built for customization

You can train your own LoRA adapters on consumer VRAM, tailoring the model to a specific style, product, or character.

Up to 4MP output

It generates and edits at resolutions up to 4 megapixels with strong lighting, faces, hands, and text.

Made with Flux 2 Dev

A few outputs generated through the Flux 2 Dev API on Apiframe.

Flux 2 Dev photorealistic hero banner of a hiking backpack on a mossy rock in morning mist with soft natural light

A photorealistic hero banner of a hiking backpack on a mossy rock, morning mist, soft natural light.

Flux 2 Dev three product renders of the same sneaker in white, black, and red with a consistent angle and lighting

Three product renders of the same sneaker in white, black, and red, consistent angle and lighting.

Flux 2 Dev 3D concept art frame of a futuristic train station interior with warm lighting and detailed reflections

A 3D concept art frame of a futuristic train station interior, warm lighting, detailed reflections.

Flux 2 Dev cozy reading nook with a velvet armchair, a stack of books, and a warm lamp in late afternoon light

A cozy reading nook with a velvet armchair, a stack of books, and a warm lamp, late afternoon light.

Flux 2 Dev ad creative for a cold brew can on crushed ice with condensation droplets and bright studio lighting

An ad creative for a cold brew can on crushed ice, condensation droplets, bright studio lighting.

Flux 2 Dev consistent mascot shown waving, sitting at a desk, and giving a thumbs up in a unified style

Using these reference images of our mascot, show it waving, sitting at a desk, and giving a thumbs up, in a consistent style.

Overview

Endpoint
POST /v2/images/generate
Model ID
flux-2-dev
Params key
fluxParams
Modality
Image
Provider
Black Forest Labs
Avg. completion
~10s

Capabilities

Aspect ratios1:1, 3:4, 4:3, 9:16, 16:9
Image inputSupported
Avg. time~10s

Quick start

Send a single POST /v2/images/generate request with your API key to generate with Flux 2 Dev. The call returns a jobId you can poll or receive via webhook.

curl -X POST https://api.apiframe.ai/v2/images/generate \
  -H "X-API-Key: afk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
        "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
        "model": "flux-2-dev",
        "fluxParams": {
            "image_prompt": "https://example.com/input.jpg",
            "image_prompt_strength": 0.5,
            "steps": 28,
            "guidance": 3
        }
    }'
import requests

response = requests.post(
    "https://api.apiframe.ai/v2/images/generate",
    headers={
        "X-API-Key": "afk_your_api_key_here",
        "Content-Type": "application/json",
    },
    json={
        "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
        "model": "flux-2-dev",
        "fluxParams": {
            "image_prompt": "https://example.com/input.jpg",
            "image_prompt_strength": 0.5,
            "steps": 28,
            "guidance": 3
        }
    },
)
print(response.json())  # { "jobId": "...", "status": "QUEUED" }
const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
  method: "POST",
  headers: {
    "X-API-Key": "afk_your_api_key_here",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "prompt": "a sleek silver sports car on a coastal highway at sunset, hyper-realistic",
    "model": "flux-2-dev",
    "fluxParams": {
      "image_prompt": "https://example.com/input.jpg",
      "image_prompt_strength": 0.5,
      "steps": 28,
      "guidance": 3
    }
  }),
});
const { jobId } = await response.json();
console.log(jobId);

Response & job lifecycle

Generation is asynchronous. A successful submission returns 202 Accepted with a jobId. Poll GET /v2/jobs/{id} (or supply a webhook_url) until the status is COMPLETED; the result field then holds the output URL(s).

1. Submission response (202)

{
  "jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
  "status": "QUEUED"
}

2. Poll for the result

curl https://api.apiframe.ai/v2/jobs/JOB_ID \
  -H "X-API-Key: afk_your_api_key_here"
import requests, time

while True:
    job = requests.get(
        "https://api.apiframe.ai/v2/jobs/JOB_ID",
        headers={"X-API-Key": "afk_your_api_key_here"},
    ).json()
    if job["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(2)
print(job["result"])
let job;
do {
  await new Promise((r) => setTimeout(r, 2000));
  job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
    headers: { "X-API-Key": "afk_your_api_key_here" },
  }).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);

Input schema

Request parameters accepted by the Flux 2 Dev endpoint. Model-specific options are nested under the params object shown below.

Parameter Type Required Default Allowed / range Description
prompt string required Text description of what to generate.
model string required "flux-2-dev" "flux-2-dev" The model identifier for this endpoint.
fluxParams.image_prompt string (URL) optional Reference image (URL)
fluxParams.image_prompt_strength number optional 0.5 min 0, max 1, step 0.05 How closely to follow the reference image (0–1).
fluxParams.steps number optional 28 min 1, max 50, step 1 Steps
fluxParams.guidance number optional 3 min 1.5, max 10, step 0.1 How strictly to follow the prompt.
fluxParams.output_format string optional "jpg" "jpg", "png", "webp" Output format
fluxParams.output_quality number optional 90 min 0, max 100, step 1 Output quality
fluxParams.prompt_upsampling boolean optional false Let the model rewrite your prompt for better quality.
fluxParams.go_fast boolean optional false Go fast
fluxParams.seed number optional step 1 Reuse a number to reproduce the same result.

Frequently Asked Questions

Common questions about the Flux 2 Dev API.

Is Flux 2 Dev free?

The open weights are free to download and run, but they are released under a non-commercial license.

Can you use it commercially?

Not under the open-weight license alone. Commercial use requires a separate self-hosted commercial license from Black Forest Labs, or using the paid API.

Can you run it locally, and what hardware do you need?

Yes. Full precision needs heavy VRAM, but quantized versions run on consumer RTX cards in roughly the 14 to 24GB range via ComfyUI and Diffusers.

How is it different from Pro, Flex, and Max?

Dev is the open-weight option built for local use and customization, while Pro, Flex, and Max are hosted, proprietary tiers.

Can you fine-tune it?

Yes. It supports LoRA training on consumer hardware for custom styles and subjects.

Where can you access it?

Through Apiframe, as well as Hugging Face for the open weights and major hosting partners.

Still have questions?

Start building with the Flux 2 Dev API

Get your API key and integrate Flux 2 Dev in minutes — Pay-as-you-go.

Free credits to start
One API for every model
Webhooks, SDKs & idempotency
No provider account required

Questions? Join our Discord or contact sales.