Flux 2 Flex API
Black Forest Labs' developer-controlled member of the Flux 2 family (Nov 2025), built for typography and fine detail, with manual control over the quality, speed, and cost of every generation.
- 4MP
- Max resolution
- ~18s
- Avg. generation
- 4 credits
- From
Image · example Playground
Try Flux 2 Flex right here.
Your output lands here. Hit generate to run this request in Studio.
Pricing
Simple per-generation pricing.
4–30 credits per generation ≈ $0.04–$0.30
The rate depends on the resolution and options you pick.
- You only pay for successful generations. Failed jobs are refunded automatically.
- One credit balance across every model on Apiframe, no per-model plans.
- Start with free credits. No subscription required.
- Volume discounts on larger plans.
Specs
At a glance.
Quickstart
How to call the Flux 2 Flex API.
Send one POST /v2/images/generate request with your API key. The call returns a jobId you can poll, or pass a webhook_url and the result is pushed to you the moment it's ready.
Swap flux-2-flex for any other model and nothing else changes.
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-flex",
"fluxParams": {
"resolution": "2MP",
"image_prompt": "https://example.com/input.jpg",
"image_prompt_strength": 0.5,
"steps": 28
}
}),
});
const { jobId } = await response.json();
console.log(jobId); Input schema
Every field Flux 2 Flex accepts, with types and defaults. The full reference lives in the docs.
| Field | Type | Description |
|---|---|---|
| prompt required | string | Text description of what to generate. |
| model required | string | The model identifier for this endpoint. Default:"flux-2-flex" · "flux-2-flex" |
| fluxParams.resolution | string | Resolution Default:"2MP" · "0.5MP", "1MP", "2MP", "4MP" |
| fluxParams.image_prompt | string (URL) | Reference image (URL) |
| fluxParams.image_prompt_strength | number | How closely to follow the reference image (0–1). Default:0.5 · min 0, max 1, step 0.05 |
| fluxParams.steps | number | Steps Default:28 · min 1, max 50, step 1 |
| fluxParams.guidance | number | How strictly to follow the prompt. Default:3 · min 1.5, max 10, step 0.1 |
| fluxParams.output_format | string | Output format Default:"jpg" · "jpg", "png", "webp" |
| fluxParams.output_quality | number | Output quality Default:90 · min 0, max 100, step 1 |
| fluxParams.prompt_upsampling | boolean | Let the model rewrite your prompt for better quality. Default:false |
| fluxParams.go_fast | boolean | Go fast Default:false |
| fluxParams.seed | number | Reuse a number to reproduce the same result. step 1 |
The Flux flagship
Flux 2 Flex is one of 7 Flux image models on Apiframe. The full editorial page (showcase, comparison, and use cases) lives on the flagship.
The quality ceiling of the Flux family.
Explore Flux 2 Max All image modelsFlux 2 Flex questions
What teams ask before shipping with Flux 2 Flex. Everything else lives in the docs.
How is it different from Flux 2 Pro?
Flex exposes the inference steps and guidance scale for manual control, while Pro auto-tunes them for hands-off production. Flex sits at a higher price point and leans toward typography and detail work.
How much does it cost?
On Apiframe it ranges from 4 credits ($0.04) at 0.5MP to 30 credits ($0.30) at 4MP.
What do the steps and guidance settings actually do?
Steps act as a quality dial that trades speed for detail, and guidance scale controls how literally the model follows your prompt.
How many reference images can it use?
Up to 10 at once, totaling 14MP of input.
Can it edit images, not just generate them?
Yes, it supports both text-to-image generation and editing at up to 4MP.
Where can you access it?
Through Apiframe, as well as the BFL API and major hosting partners.
Related models
All image modelsMidjourney
by Midjourney
Iconic stylised, cinematic look.
View modelNano Banana 2
by Google
Next-gen Nano Banana with refined detail.
View modelSeedream 5.0 Pro
by ByteDance
Flagship ByteDance model with sharp 1K/2K output and up to 10 reference images.
View modelIdeogram v4 Quality
by Ideogram
Highest-quality Ideogram v4 tier for production-ready images.
View model9,800+
developers & companies
Official partner of
Power your next AI product with Apiframe.
Instant access to 70+ media models through a single API. Start free and scale when you're ready.