Loading model…正在加载模型详情…
Loading model…正在加载模型详情…
用 Black Forest Labs 的 FLUX.2 根据文字生成图片,选择 Pro 或 Flex 版,探索写实细节与含文字的构图。


A humanoid figure with a vintage television set for a head, featuring a green-tinted screen displaying a `Hello FLUX.2` writing in ASCII font. The figure is wearing a yellow raincoat, and there are various wires and components attached to the television. The background is cloudy and indistinct, suggesting an outdoor setting

cinematic close-up portrait of a woman with loose, windswept ginger hair and freckles, standing in a snowy environment under strong sunlight. the lighting creates highlights in her hair and soft natural shadows on her face. the background shows snowy mountains and a gradient blue sky fading toward the horizon. she is wearing a denim jacket with a green and white scarf tied around her neck. the composition is intimate, captured from a slightly side profile, with shallow depth of field and a warm film-like aesthetic, sharp and clear with rich textures
FLUX.2 是 Black Forest Labs 的图片模型系列。Black Forest Labs 介绍称,它兼顾写实细节、文字呈现和对提示词的理解。
UniRoute 提供 Pro 和 Flex 的文生图版本。两者都接受文字提示词,并提供结合分辨率与宽高比的尺寸选项;具体组合和请求价格随版本而异。
Black Forest Labs 介绍称,FLUX.2 相比 FLUX.1 改进了细节、字体呈现和指令理解。你可以在这里使用 UniRoute 开放的选项比较可调用的 Pro 与 Flex 版。
目前通过 UniRoute 使用 FLUX.2 可以做什么。
描述图片的主体、风格、构图以及需要呈现的文字,选择可用规格,查看报价后再运行。

FLUX.2 的其他模式与控制项(图片编辑、多张参考图、采样步数和提示词引导设置)暂未在 UniRoute 开放。
可调用的版本,以及各自的选项和价格。
| 版本 | 模型 ID | 模式 | 输入 | 输出 | 价格 |
|---|---|---|---|---|---|
| FLUX.2 Pro | flux-2/pro-text-to-image | 文生图 | 文字提示词和尺寸选项 | 分辨率:1K、2K;宽高比:16:9、1:1 | $0.03 至 $0.04 / 次请求 |
| FLUX.2 Flex | flux-2/flex-text-to-image | 文生图 | 文字提示词和尺寸选项 | 分辨率:1K、2K;宽高比:1:1、16:9、9:16 | $0.09 至 $0.15 / 次请求 |
按请求计价,所选规格决定价格。
| FLUX.2 Pro | |
|---|---|
| 1K:16:9 | $0.03 |
| 2K:1:1 | $0.04 |
| FLUX.2 Flex | |
|---|---|
| 1K · 1:1 | $0.09 |
| 1K · 16:9 | $0.09 |
| 1K · 9:16 | $0.09 |
| 2K · 1:1 | $0.15 |
| 2K · 16:9 | $0.15 |
| 2K · 9:16 | $0.15 |
金额四舍五入到分;工作区中的实时报价显示精确金额。价格更新于 2026-11-08。
按用量计费,统一使用一个美元钱包余额。每次请求前都会先看到报价。
用媒体 API 在你自己的代码里调用 FLUX.2。
# Requires bash, curl and jq. Set API_KEY to your own unified UniRoute Key.set -euo pipefail: "${API_KEY:?Set API_KEY first}"BASE='https://api.uniroute.app/v1/media'MODEL='flux-2/flex-text-to-image'OPTION='1K:1:1'PROMPT='A calm sunrise over a mountain lake'curl -fsS --max-time 60 "$BASE/catalog" -H "Authorization: Bearer $API_KEY" | jq -e '.data.models'BODY=$(jq -n --arg model "$MODEL" --arg option "$OPTION" --arg prompt "$PROMPT" '{model:$model,option:$option,prompt:$prompt}')QUOTE_BODY=$(printf '%s' "$BODY" | jq '{model,option}')QUOTE=$(curl -fsS --max-time 60 "$BASE/quote" -H "Authorization: Bearer $API_KEY" -H 'Content-Type: application/json' -d "$QUOTE_BODY")CAP=$(printf '%s' "$QUOTE" | jq -er '.data.quoted_usd')BODY=$(printf '%s' "$BODY" | jq --arg cap "$CAP" '. + {max_cost_usd:$cap}')IDEMPOTENCY="example-$(date +%s)-$$"create() { curl -fsS --max-time 60 "$BASE/tasks" -H "Authorization: Bearer $API_KEY" -H "Idempotency-Key: $IDEMPOTENCY" -H 'Content-Type: application/json' -d "$BODY"; }TASK_ID=$(create | jq -er '.data.task_id')# The same request and idempotency key must return the original task without charging again.REPLAY_ID=$(create | jq -er '.data.task_id')[ "$TASK_ID" = "$REPLAY_ID" ]for attempt in $(seq 1 120); do TASK=$(curl -fsS --max-time 60 "$BASE/tasks/$TASK_ID" -H "Authorization: Bearer $API_KEY") printf '%s' "$TASK" | jq -e '.data | {task_id,status,billing}' if printf '%s' "$TASK" | jq -e '.data.status == "success" and .data.billing.state == "charged"' >/dev/null; then index=0 while IFS= read -r url; do index=$((index+1)) curl -fL --max-time 120 "$url" -o "$TASK_ID-$index.bin" done < <(printf '%s' "$TASK" | jq -er '.data.urls[].url') break fi if printf '%s' "$TASK" | jq -e '.data.status == "failed" and .data.billing.state == "released"' >/dev/null; then exit 1; fi if [ "$attempt" = 120 ]; then echo "Polling limit reached. Keep task ID $TASK_ID and query it later; do not create a new task." >&2 exit 1 fi sleep 5donecurl -fsS --max-time 60 "$BASE/tasks?limit=20" -H "Authorization: Bearer $API_KEY" | jq -e '.data'# Check this task and the caller Key in Console usage; billing.charged_usd is the actual USD charge.| 名称 | 位置 | 说明 |
|---|---|---|
model | 请求体 | 要运行的模型 ID。 |
option | 请求体 | 该模型提供的规格之一:1K:16:9, 2K:1:1, 1K:1:1, 1K:9:16, 2K:16:9, 2K:9:16。 |
prompt | 请求体 | 描述要生成内容的文字提示词。 |
max_cost_usd | 请求体 | 本次任务的最高费用(美元),取自报价。 |
Idempotency-Key | 请求头 |
FLUX.2 的常见用法。
描述材质、反射和光照,探索具有写实细节的产品图片。
写清所需文字及呈现方式,尝试海报、标签和标题图形。
用文字指定主体位置、氛围和构图,探索人像或环境概念。
关于 FLUX.2 的常见问题。
FLUX.2 是 Black Forest Labs 的图片模型系列。Black Forest Labs 介绍称,它兼顾写实细节、文字呈现和对提示词的理解。
两个版本都根据文字生成图片,各有对应的尺寸组合与价格。虽然 Black Forest Labs 介绍了 Flex 的更多控制能力,但 UniRoute 当前只开放提示词和目录中的尺寸选项。
先选择 Pro 或 Flex,再选择对应的分辨率与宽高比组合。UniRoute 暂未为这两个版本开放采样步数或提示词引导设置。
$0.03 起 / 张。每次请求按所选版本和规格报价。完整请求价格见“价格”一节(价格更新于 2026-11-08)。
暂时不可以。UniRoute 当前的工作区接受文字提示词和上方列出的目录规格,本页所列版本尚未开放参考图片输入。
使用媒体 API:先对所选模型和规格请求报价,再带上 Idempotency-Key 和最高费用创建任务,然后轮询任务直到结果就绪。“API”一节给出了完整示例和参数说明。
没有。生成费用从你的钱包余额中扣除。你可以直接打开工作区查看价格,注册账号后可看到针对当前设置的实时报价,只有被接受的请求才会计费。
| 每个任务唯一的键;重复请求会返回原任务,不会重复扣费。 |