Direct parameter control
Unlike the other Flux 2 models, which auto-tune their settings, Flex exposes the number of inference steps and the guidance scale so you decide the exact speed-versus-quality balance.
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.
Integrate Flux 2 Flex with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.
model: "flux-2-flex"
Unlike the other Flux 2 models, which auto-tune their settings, Flex exposes the number of inference steps and the guidance scale so you decide the exact speed-versus-quality balance.
Lower step counts (around 6 to 10) generate fast drafts, while higher counts (up to 50) produce sharper detail and cleaner text, all from one endpoint.
It is tuned to render legible text and complex layouts reliably, which makes it the strongest Flux 2 variant for text-heavy work.
It holds up better on small textures and intricate elements, especially at higher resolutions where fine detail has room to resolve.
It can take up to 10 reference images (14MP total input) to keep characters, products, and styles consistent.
It both creates images from text and edits existing ones at up to 4MP.
A few outputs generated through the Flux 2 Flex API on Apiframe.
A clean infographic titled 'How Solar Panels Work' with four labeled steps, flat modern style.
A mobile app dashboard with a balance card reading '$2,480.00', three menu tabs, and legible button labels.
A minimalist logo for a bakery called 'FLOUR & STONE', clean serif lettering, warm neutral palette.
A concert poster reading 'NIGHT MARKET LIVE' with the date 'AUG 14' and venue, bold typographic layout.
A kombucha bottle label reading 'WILD GINGER' with 'Organic, 330ml' beneath, crisp small text.
A square promo reading '24-HOUR FLASH SALE, UP TO 50% OFF' with clean type and a bright gradient.
Send a single POST /v2/images/generate request with your API key to
generate with Flux 2 Flex. 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-flex",
"fluxParams": {
"resolution": "2MP",
"image_prompt": "https://example.com/input.jpg",
"image_prompt_strength": 0.5,
"steps": 28
}
}'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-flex",
"fluxParams": {
"resolution": "2MP",
"image_prompt": "https://example.com/input.jpg",
"image_prompt_strength": 0.5,
"steps": 28
}
},
)
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-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);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 Flex 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-flex" | "flux-2-flex" | The model identifier for this endpoint. |
| fluxParams.resolution | string | optional | "2MP" | "0.5MP", "1MP", "2MP", "4MP" | Resolution |
| 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 Flex API.
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.
On Apiframe it ranges from 10 credits ($0.10) at 0.5MP to 40 credits ($0.40) at 4MP.
Steps act as a quality dial that trades speed for detail, and guidance scale controls how literally the model follows your prompt.
Up to 10 at once, totaling 14MP of input.
Yes, it supports both text-to-image generation and editing at up to 4MP.
Through Apiframe, as well as the BFL API and major hosting partners.
Still have questions?
Get your API key and integrate Flux 2 Flex in minutes — Pay-as-you-go.
Questions? Join our Discord or contact sales.