FLUX.2 Dev is a gated, non-commercial Black Forest Labs image generation and editing model served through a Forge-owned Diffusers Flux2Pipeline BF16 wrapper.
Observed working set on a supported GPU.
After the last request a backend stays warm on its GPU for about 15 minutes, then frees the GPU. The next request triggers a fresh cold start.
POST to the native route with the shown model field; the playground below generates a full payload.
/v1/inference/black-forest-labs-flux-2-devPOSTblack-forest-labs-flux-2-devmodel_version: diffusers-bf16gpu_type: RTX6000region: us-central1Terminal-ready smoke test for this selected target.
set -euo pipefail
# Forge API smoke test
# Forge selected target: route=/v1/models/black-forest-labs-flux-2-dev/inference-routes model=black-forest-labs-flux-2-dev version=diffusers-bf16 gpu=RTX6000 region=us-central1
FORGE_API_BASE=${FORGE_API_BASE:-'https://YOUR_FORGE_HOST'}
case "${FORGE_API_KEY:-}" in
""|replace-with-your-forge-api-key)
echo 'Set FORGE_API_KEY to a real Forge API key before running this snippet; browser SSO sessions are not sent to copied curl or SDK clients.' >&2
exit 1
;;
esac
forge_api_url() {
endpoint="$1"
base="${FORGE_API_BASE%/}"
case "$base:$endpoint" in
*/v1:/v1|*/v1:/v1/*|*/v1:/v1\?*) printf '%s%s\n' "$base" "${endpoint#/v1}" ;;
*) printf '%s%s\n' "$base" "$endpoint" ;;
esac
}
curl -sS --fail-with-body "$(forge_api_url '/v1/models/black-forest-labs-flux-2-dev/inference-routes?model_version=diffusers-bf16&gpu_type=RTX6000®ion=us-central1')" \
--max-time "${FORGE_REQUEST_TIMEOUT_SECONDS:-600}" \
-H "Authorization: Bearer ${FORGE_API_KEY}" | \
python3 -m json.toolNative route check · Best for model-specific payloads; run the route check first, then copy the schema-specific request from the playground.
Copied snippets include gpu_type and region, so the first request targets this verified GPU and region. Remove those fields to let Forge choose another compatible target.
8 free GPUs · Live capacity for RTX6000 in us-central1.
https://YOUR_FORGE_HOST/v1/inference/black-forest-labs-flux-2-devClient auth: Set FORGE_API_KEY to a real Forge API key before running copied curl, fetch, or SDK snippets. Browser SSO only authenticates this web session.
Open AccountAuthorization: Bearer $FORGE_API_KEYexport FORGE_API_BASE='https://YOUR_FORGE_HOST'
export FORGE_API_KEY="${FORGE_API_KEY:-replace-with-your-forge-api-key}"
export FORGE_REQUEST_TIMEOUT_SECONDS="${FORGE_REQUEST_TIMEOUT_SECONDS:-600}"
export FORGE_API_ROUTE='/v1/inference/black-forest-labs-flux-2-dev'
export MODEL_OR_FAMILY_SLUG='black-forest-labs-flux-2-dev'
export FORGE_MODEL_VERSION='diffusers-bf16'
export FORGE_GPU_TYPE='RTX6000'
export FORGE_REGION='us-central1'Copy these values into a local .env file when moving the selected target into an app or SDK client.
# Forge selected target: route=/v1/inference/black-forest-labs-flux-2-dev model=black-forest-labs-flux-2-dev version=diffusers-bf16 gpu=RTX6000 region=us-central1
FORGE_API_BASE="https://YOUR_FORGE_HOST"
FORGE_API_ROUTE="/v1/inference/black-forest-labs-flux-2-dev"
FORGE_API_KEY="replace-with-your-forge-api-key"
FORGE_REQUEST_TIMEOUT_SECONDS="600"
MODEL_OR_FAMILY_SLUG="black-forest-labs-flux-2-dev"
FORGE_MODEL_VERSION="diffusers-bf16"
FORGE_GPU_TYPE="RTX6000"
FORGE_REGION="us-central1"Add these rules before replacing the placeholder API key so local Forge secrets stay out of commits while .env.example can remain tracked.
# Forge local API secrets
.env
.env.*
!.env.examplehttps://YOUR_FORGE_HOST/v1/models/black-forest-labs-flux-2-dev/run-estimate?model_version=diffusers-bf16&gpu_type=RTX6000®ion=us-central1set -euo pipefail
# Forge selected target: route=/v1/inference/black-forest-labs-flux-2-dev model=black-forest-labs-flux-2-dev version=diffusers-bf16 gpu=RTX6000 region=us-central1
FORGE_API_BASE=${FORGE_API_BASE:-'https://YOUR_FORGE_HOST'}
export MODEL_OR_FAMILY_SLUG=${MODEL_OR_FAMILY_SLUG:-'black-forest-labs-flux-2-dev'}
export FORGE_MODEL_VERSION=${FORGE_MODEL_VERSION:-'diffusers-bf16'}
export FORGE_GPU_TYPE=${FORGE_GPU_TYPE:-'RTX6000'}
export FORGE_REGION=${FORGE_REGION:-'us-central1'}
case "${FORGE_API_KEY:-}" in
""|replace-with-your-forge-api-key)
echo 'Set FORGE_API_KEY to a real Forge API key before running this snippet; browser SSO sessions are not sent to copied curl or SDK clients.' >&2
exit 1
;;
esac
forge_api_url() {
endpoint="$1"
base="${FORGE_API_BASE%/}"
case "$base:$endpoint" in
*/v1:/v1|*/v1:/v1/*|*/v1:/v1\?*) printf '%s%s\n' "$base" "${endpoint#/v1}" ;;
*) printf '%s%s\n' "$base" "$endpoint" ;;
esac
}
reliability_path="$(python3 -c 'import os
from urllib.parse import quote, urlencode
model = os.environ.get("MODEL_OR_FAMILY_SLUG", "").strip()
if not model:
raise SystemExit("Set MODEL_OR_FAMILY_SLUG from search or route finder output before checking reliability.")
params = {}
model_version = os.environ.get("FORGE_MODEL_VERSION", "").strip()
if model_version:
params["model_version"] = model_version
gpu_type = os.environ.get("FORGE_GPU_TYPE", "").strip()
if gpu_type:
params["gpu_type"] = gpu_type
region = os.environ.get("FORGE_REGION", "").strip()
if region:
params["region"] = region
path = "/v1/models/" + quote(model, safe="") + "/reliability"
if params:
path += "?" + urlencode(params)
print(path)')"
curl -sS --fail-with-body "$(forge_api_url "$reliability_path")" \
--max-time "${FORGE_REQUEST_TIMEOUT_SECONDS:-600}" \
-H "Authorization: Bearer ${FORGE_API_KEY}" | \
python3 -c 'import json, shlex, sys
payload = json.load(sys.stdin)
print(
f"{payload.get('\''slug'\'')} reliability={payload.get('\''reliability_status'\'')} "
f"supported={payload.get('\''supported_rows'\'', 0)}/{payload.get('\''total_rows'\'', 0)}"
)
filters = payload.get("filters") or {}
if filters:
print("filters: " + ", ".join(f"{key}={value}" for key, value in filters.items()))
def describe_target(target):
details = []
request_ms = target.get("request_ms_p50") or target.get("request_ms")
if request_ms is not None:
details.append(f"p50={request_ms}ms")
warm_cost = target.get("estimated_warm_request_cost_usd")
if warm_cost is not None:
details.append(f"warm_cost_usd={warm_cost}")
elif target.get("cost_per_gpu_hour_usd") is not None:
details.append(f"gpu_hour_usd={target['\''cost_per_gpu_hour_usd'\'']}")
success_rate = target.get("observed_success_rate")
if isinstance(success_rate, (int, float)):
details.append(f"success={success_rate:.0%}")
return ", ".join(details) or target.get("status") or "supported"
exports = {}
for label, key in (
("fastest supported", "fastest_supported_target"),
("lowest-cost supported", "lowest_cost_supported_target"),
):
target = payload.get(key) or {}
gpu_type = target.get("gpu_type")
if not gpu_type:
continue
identity = (str(gpu_type), str(target.get("region") or ""))
exports.setdefault(identity, {"labels": [], "target": target})["labels"].append(label)
if not exports:
print("No supported GPU/region target returned.", file=sys.stderr)
print(json.dumps({
"status_counts": payload.get("status_counts", {}),
"failure_reason_counts": payload.get("failure_reason_counts", {}),
}, indent=2))
raise SystemExit(1)
for (gpu_type, region), entry in exports.items():
assignments = [f"FORGE_GPU_TYPE={shlex.quote(gpu_type)}"]
if region:
assignments.append(f"FORGE_REGION={shlex.quote(region)}")
labels = " + ".join(entry["labels"])
details = describe_target(entry["target"])
print(f"export {'\'' '\''.join(assignments)} # {labels}: {details}")'https://YOUR_FORGE_HOST/v1/model-families/black-forest-labs-flux-2-dev/status?version=diffusers-bf16set -euo pipefail
# Forge selected target: route=/v1/inference/black-forest-labs-flux-2-dev model=black-forest-labs-flux-2-dev version=diffusers-bf16 gpu=RTX6000 region=us-central1
FORGE_API_BASE=${FORGE_API_BASE:-'https://YOUR_FORGE_HOST'}
export MODEL_OR_FAMILY_SLUG=${MODEL_OR_FAMILY_SLUG:-'black-forest-labs-flux-2-dev'}
export FORGE_MODEL_VERSION=${FORGE_MODEL_VERSION:-'diffusers-bf16'}
export FORGE_GPU_TYPE=${FORGE_GPU_TYPE:-'RTX6000'}
export FORGE_REGION=${FORGE_REGION:-'us-central1'}
export FORGE_KEEP_WARM=${FORGE_KEEP_WARM:-false}
case "${FORGE_API_KEY:-}" in
""|replace-with-your-forge-api-key)
echo 'Set FORGE_API_KEY to a real Forge API key before running this snippet; browser SSO sessions are not sent to copied curl or SDK clients.' >&2
exit 1
;;
esac
forge_api_url() {
endpoint="$1"
base="${FORGE_API_BASE%/}"
case "$base:$endpoint" in
*/v1:/v1|*/v1:/v1/*|*/v1:/v1\?*) printf '%s%s\n' "$base" "${endpoint#/v1}" ;;
*) printf '%s%s\n' "$base" "$endpoint" ;;
esac
}
runtime_start_path="$(python3 -c 'import os
from urllib.parse import quote
model = os.environ.get("MODEL_OR_FAMILY_SLUG", "").strip()
if not model:
raise SystemExit("Set MODEL_OR_FAMILY_SLUG from the model picker output")
print("/v1/model-families/" + quote(model, safe="") + "/start")')"
python3 -c 'import json, os
def env_value(name):
value = os.environ.get(name, "").strip()
return value or None
payload = {}
version = env_value("FORGE_MODEL_VERSION")
if version:
payload["version"] = version
gpu_type = env_value("FORGE_GPU_TYPE")
if gpu_type:
payload["gpu_type"] = gpu_type
region = env_value("FORGE_REGION")
if region:
payload["region"] = region
keep_warm = env_value("FORGE_KEEP_WARM")
payload["run_until_stopped"] = (keep_warm or "").lower() in {"1", "true", "yes", "on"}
print(json.dumps(payload))' | \
curl -sS --fail-with-body "$(forge_api_url "$runtime_start_path")" \
--max-time "${FORGE_REQUEST_TIMEOUT_SECONDS:-600}" \
-X POST \
-H "Authorization: Bearer ${FORGE_API_KEY}" \
-H "Content-Type: application/json" \
-d @- | \
python3 -c 'import json, sys
payload = json.load(sys.stdin)
slug = payload.get("slug") or "runtime"
gpu_type = payload.get("gpu_type") or "scheduler-selected GPU"
region = payload.get("region") or "scheduler-selected region"
startup_ms = payload.get("startup_ms")
state = "cold-started" if payload.get("was_cold_start") else "already warm"
suffix = f"; startup_ms={startup_ms}" if startup_ms is not None else ""
print(f"{slug} {state} on {gpu_type} in {region}{suffix}; keep_warm={payload.get('\''keep_warm'\'')}")'Pick a verified target for repeatable runs. Failed or pending details appear on the status hover.
7 verified targets
Lowest warm model time among verified targets: 15.7s p50 warm model time across 10 samples.
Lowest estimated GPU price among verified targets: $1.80/GPU-hr; 1m 53s p50 warm model time across 10 samples.
| GPU | Region | Status | VRAM | Cold start | Model time | Relative | Est. $/GPU-hr | Target |
|---|---|---|---|---|---|---|---|---|
| B200 | us-central1 | works | 111.5 GB | 3m 39s | 16.1sp50 warm model time p95 17.1s · 10 samples | 98% · -2% | $7.15 | Use in playground |
| B300fastest | uk-south1 | works | 110.0 GB | 13m 2s | 15.7sp50 warm model time p95 16.8s · p99 16.9s · 10 samples | 100% | $7.85 | Use in playground |
| H100 | eu-north1 | works | 0.7 GB | 8m 20s | 1m 34sp50 warm model time p95 1m 37s · p99 1m 38s · 10 samples | 17% · -83% | $3.85 | Use in playground |
| H200 | eu-north1 | works | 111.3 GB | 3m 53s | 22.0sp50 warm model time p95 24.3s · p99 24.8s · 10 samples | 72% · -28% | $4.50 | Use in playground |
| H200 | eu-north2 | works | 111.3 GB | 8m 15s | 22.2sp50 warm model time p95 23.5s · p99 23.6s · 10 samples | 71% · -29% | $4.50 | Use in playground |
| H200 | us-central1 | works | 111.3 GB | 3m 46s | 22.2sp50 warm model time p95 23.2s · p99 23.2s · 10 samples | 71% · -29% | $4.50 | Use in playground |
| L40S | eu-north1 | incompatible | 44.0 GB | — | — | — | $1.82 | — |
| RTX6000 | us-central1 | works | 0.7 GB | 3m 14s | 1m 53sp50 warm model time p95 1m 58s · p99 1m 59s · 10 samples | 14% · -86% | $1.80 | Use in playground |
Model time uses the p50 warm model-reported execution time when available, then falls back to the latest probe time; p95/p99 and sample count appear when there is enough probe history. Cold start excludes the first (uncached) run. VRAM is the peak GPU memory seen during the probe. Relative compares each row's model time to the highlighted baseline (fastest row by default; hover any row to re-root). The fastest chip marks only verified supported GPU-region rows. Estimated on-demand GPU price (Nebius pay-as-you-go); shown for performance/price comparison. Configured minimum GPU memory: 120 GB.
/v1/inference/black-forest-labs-flux-2-devModelblack-forest-labs-flux-2-devVersiondiffusers-bf16GPUautomaticRegionautomaticSnippet target: black-forest-labs-flux-2-dev version diffusers-bf16 using scheduler-selected GPU/region.
Client auth: Set FORGE_API_KEY to a real Forge API key before running copied curl, fetch, or SDK snippets. Browser SSO only authenticates this web session.
Open AccountFORGE_API_BASE=${FORGE_API_BASE:-'https://YOUR_FORGE_HOST'}
case "${FORGE_API_KEY:-}" in
""|replace-with-your-forge-api-key)
echo 'Set FORGE_API_KEY to a real Forge API key before running this snippet; browser SSO sessions are not sent to copied curl or SDK clients.' >&2
exit 1
;;
esac
forge_api_url() {
endpoint="$1"
base="${FORGE_API_BASE%/}"
case "$base:$endpoint" in
*/v1:/v1|*/v1:/v1/*|*/v1:/v1\?*) printf '%s%s\n' "$base" "${endpoint#/v1}" ;;
*) printf '%s%s\n' "$base" "$endpoint" ;;
esac
}
forge_print_response() {
response_file="$1"
if [ ! -s "$response_file" ]; then
printf '%s\n' '(empty response)'
return 0
fi
if command -v python3 >/dev/null 2>&1; then
python3 -m json.tool "$response_file" 2>/dev/null || cat "$response_file"
else
cat "$response_file"
fi
}
response_file="$(mktemp)"
if curl -sS --fail-with-body "$(forge_api_url '/v1/inference/black-forest-labs-flux-2-dev')" \
--max-time "${FORGE_REQUEST_TIMEOUT_SECONDS:-600}" \
-H "Authorization: Bearer ${FORGE_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"seed": 0,
"image": "",
"steps": 28,
"width": 1024,
"height": 1024,
"prompt": "A photorealistic editorial product image of a compact GPU workstation on a clean lab bench, realistic materials, softbox lighting, sharp details, no text",
"aspect_ratio": "1:1",
"guidance_scale": 4,
"caption_upsample_temperature": 0.2,
"model": "black-forest-labs-flux-2-dev",
"model_version": "diffusers-bf16"
}' \
-o "$response_file"; then
forge_print_response "$response_file"
status=$?
rm -f "$response_file"
(exit "$status")
else
status=$?
cat "$response_file" >&2
rm -f "$response_file"
(exit "$status")
fiCopy setup before the request when moving this snippet into a fresh shell. The default 600 second timeout is intentional for GPU cold starts and can be overridden with FORGE_REQUEST_TIMEOUT_SECONDS.
export FORGE_API_BASE='https://YOUR_FORGE_HOST'
export FORGE_API_KEY="${FORGE_API_KEY:-replace-with-your-forge-api-key}"
export FORGE_REQUEST_TIMEOUT_SECONDS="${FORGE_REQUEST_TIMEOUT_SECONDS:-600}"Copy these values into a local .env file when moving the selected target into an app or SDK client.
# Forge selected target: route=/v1/inference/black-forest-labs-flux-2-dev model=black-forest-labs-flux-2-dev version=diffusers-bf16
FORGE_API_BASE="https://YOUR_FORGE_HOST"
FORGE_API_ROUTE="/v1/inference/black-forest-labs-flux-2-dev"
FORGE_API_KEY="replace-with-your-forge-api-key"
FORGE_REQUEST_TIMEOUT_SECONDS="600"
MODEL_OR_FAMILY_SLUG="black-forest-labs-flux-2-dev"
FORGE_MODEL_VERSION="diffusers-bf16"Run a request to see output here.
Run a dedicated, autoscaling endpoint in your own Nebius account. The endpoint runs under your account and billing — Forge just pre-fills the configuration for you.
Opens the Nebius Console with the image pre-filled for FLUX.2 Dev (Forge version Diffusers BF16).
Prefer to create the endpoint from the CLI, or self-manage the container image? Use the commands below.
The image is hosted on cr.eu-north1.nebius.cloud; you may need registry credentials in the Console form. The CLI below includes placeholders.
The links use Forge’s eu-north1 Nebius Container Registry mirror. If your project can’t pull that private mirror, add pull credentials or a registry secret.
# Runs in YOUR Nebius account (you own + pay for the endpoint).
# platform/preset must exist in your project — list them with:
# nebius compute platform list
export ENDPOINT_NAME="black-forest-labs-flux-2-dev-diffusers-bf16-private"
export AUTH_TOKEN=$(openssl rand -hex 32)
export SUBNET_ID=$(nebius vpc subnet list --format jsonpath='{.items[0].metadata.id}')
export REGISTRY_USERNAME="YOUR_REGISTRY_USERNAME"
export REGISTRY_PASSWORD="YOUR_REGISTRY_PASSWORD"
# Note: the --image above points at Forge's regional Nebius CR mirror.
# Serverless AI can pull Container Registry images without credentials
# only when the image is public or in the same project. For a private
# mirror in another project, provide pull credentials or a MysteryBox
# registry secret with REGISTRY_USERNAME and REGISTRY_PASSWORD.
nebius ai endpoint create \
--name "$ENDPOINT_NAME" \
--image "cr.eu-north1.nebius.cloud/e00h91c5sa606xfwpj/models/forge-flux2-dev-diffusers-bf16:20260603-pytorch291-cuda128-bf16-v1@sha256:2a033f066904c01d1377b00aa28773fdea0e131da03f51b01ab0bde448acb918" \
--registry-username "$REGISTRY_USERNAME" \
--registry-password "$REGISTRY_PASSWORD" \
--container-port 8000 \
--auth token \
--token "$AUTH_TOKEN" \
--subnet-id "$SUBNET_ID"
export ENDPOINT_ID=$(nebius ai endpoint get-by-name --name "$ENDPOINT_NAME" --format jsonpath='{.metadata.id}')
nebius ai endpoint get "$ENDPOINT_ID"Need a throughput- and cost-optimized build tuned for specific Nebius GPUs? Nebius Token Factory is coming soon — contact your Nebius account team for early access.