FLUX 2 Flex
Sign in to try FLUX 2 Flex
Sign in with your Google account and top up credits to get started.
Sign in with GoogleUse via API
Base URL: https://adverraai.com/hub/api/v1 · Authenticate with Authorization: Bearer YOUR_API_KEY — create a key in your dashboard
# 1) Submit a task
curl https://adverraai.com/hub/api/v1/images/generations \
-H "Authorization: Bearer $ADVERRA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "flux-2-flex",
"prompt": "a cinematic shot of a city at night",
"resolution": "2MP",
"size": "auto"
}'
# => {"id":"task_xxx","status":"queued",...}
# 2) Check status (every 3-5 seconds until status = completed)
curl https://adverraai.com/hub/api/v1/tasks/task_xxx -H "Authorization: Bearer $ADVERRA_API_KEY"
# => {"status":"completed","output":[{"type":"image","url":"https://..."}]}
import requests, time
API = "https://adverraai.com/hub/api/v1"
H = {"Authorization": "Bearer YOUR_API_KEY"}
task = requests.post(f"{API}/images/generations", headers=H, json={
"model": "flux-2-flex",
"prompt": "a cinematic shot of a city at night",
"resolution": "2MP",
"size": "auto"
}).json()
while task["status"] not in ("completed", "failed"):
time.sleep(4)
task = requests.get(f"{API}/tasks/{task['id']}", headers=H).json()
print(task["status"], [o["url"] for o in task["output"]], task["credits_charged"])
const API = "https://adverraai.com/hub/api/v1", H = { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" };
let task = await (await fetch(`${API}/images/generations`, { method: "POST", headers: H, body: JSON.stringify({
model: "flux-2-flex",
"prompt": "a cinematic shot of a city at night",
"resolution": "2MP",
"size": "auto"
}) })).json();
while (!["completed", "failed"].includes(task.status)) {
await new Promise(r => setTimeout(r, 4000));
task = await (await fetch(`${API}/tasks/${task.id}`, { headers: H })).json();
}
console.log(task.output);
Common parameters: prompt, image_urls, size / aspect_ratio, resolution, duration, n, negative_prompt, seed. Credits are reserved at an estimated price when you submit and adjusted to the actual cost when the task finishes (failed tasks are fully refunded).
Parameters for this model
Send as JSON in the request body. Fields marked * are required.
| Parameter | Type | Allowed values | Default | Description |
|---|---|---|---|---|
model * |
string | – | – | ID of the model to call — flux-2-flex |
prompt * |
string | – | – | Text describing what to generate |
resolution |
string | 1MP, 2MP, 3MP, 4MP | 2MP | Output resolution |
size |
string | 1:1, 4:3, 3:4, 16:9, 9:16, 3:2, 2:3, 21:9, 9:21, auto | auto | Size or aspect ratio of the result |
image_urls |
array (URL) | – | – | Reference image URLs |
output_format |
string | jpeg, png, webp | jpeg | Output image encoding. Supported values: jpeg, png, and webp. |
seed |
number | – | – | Random seed; reuse a value for similar results |
prompt_upsampling |
boolean | true, false | false | Whether to enhance and rewrite the prompt before generation. The default is false. Pass false explicitly to disable prompt rewriting. |
safety_tolerance |
number | 0 – 5 | 2 | Safety tolerance from 0 to 5. Higher values are more permissive. |
steps |
number | 1 – 50 | 50 | Sampling steps from 1 to 50. Higher values can improve detail but take longer. |
guidance |
number | 1.5 – 10 | 5 | Prompt guidance from 1.5 to 10. Higher values follow the prompt more closely. |
About this model
FLUX 2 Flex is a Image model by Black Forest Labs
Flux 2 delivers state-of-the-art AI image generation and editing. Create photorealistic images from text with Flux 2 Pro, edit existing images with natural language using Flux 2 Flex, and maintain style consistency with multi-reference support.
Preparing details in English…
Examples
Sample videos from the model developer's official channels