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.
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"
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.
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.
It pairs with a Mistral-3 language model and a 32k-token context window, which sharpens prompt accuracy and handles long, detailed instructions.
Generation and image editing with multiple reference images live in a single model, keeping characters, style, and branding consistent.
You can train your own LoRA adapters on consumer VRAM, tailoring the model to a specific style, product, or character.
It generates and edits at resolutions up to 4 megapixels with strong lighting, faces, hands, and text.
A few outputs generated through the Flux 2 Dev API on Apiframe.
A photorealistic hero banner of a hiking backpack on a mossy rock, morning mist, soft natural light.
Three product renders of the same sneaker in white, black, and red, consistent angle and lighting.
A 3D concept art frame of a futuristic train station interior, warm lighting, detailed reflections.
A cozy reading nook with a velvet armchair, a stack of books, and a warm lamp, late afternoon light.
An ad creative for a cold brew can on crushed ice, condensation droplets, bright studio lighting.
Using these reference images of our mascot, show it waving, sitting at a desk, and giving a thumbs up, in a consistent style.
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);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).
{
"jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"status": "QUEUED"
}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);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. |
Common questions about the Flux 2 Dev API.
The open weights are free to download and run, but they are released under a non-commercial license.
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.
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.
Dev is the open-weight option built for local use and customization, while Pro, Flex, and Max are hosted, proprietary tiers.
Yes. It supports LoRA training on consumer hardware for custom styles and subjects.
Through Apiframe, as well as Hugging Face for the open weights and major hosting partners.
Still have questions?
Get your API key and integrate Flux 2 Dev in minutes — Pay-as-you-go.
Questions? Join our Discord or contact sales.