图生图Flux 2 Dev

flux-2-dev/edit

flux-2-dev/edit

FLUX.2 [dev] Edit 是 Black Forest Labs 推出的高精度图像编辑模型,支持通过自然语言指令和精确的十六进制颜色控制进行图生图编辑,带来一致且具备影棚级质量的效果。提供开箱即用的 REST 推理 API,性能出色,无冷启动,价格实惠。

示例

flux-2-dev/edit 示例 1

参数

名称类型默认约束说明
prompt *提示词textarea—≤ 5000 chars用于生成的正向提示词。
images *图片image_upload—image/* · 1–3 items用于编辑的输入图片 URL 列表。最多可上传 3 张图片。
size尺寸text—≤ 500 chars生成媒体的尺寸(像素),格式为宽度*高度。
seed随机种子number—step 1用于生成的随机种子。设为 -1 表示使用随机种子。

输出字段

字段类型说明
imagesarray<string>

API

通过统一 REST API 调用本模型;在 API Keys 页获取密钥。

cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/flux-2-dev/edit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "Edit the product photo to a clean studio look: keep the object shape and camera angle unchanged, replace the background with a soft light-gray seamless backdrop, remove minor dust and scratches, enhance material detail, and change the accent color to #2E6BFF while preserving realistic reflections and shadows.",
    "images": [
      "https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/08/d9b3c7adadcf.jpeg"
    ],
    "size": "1024*1024",
    "seed": -1
  }
}'

# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
import time, requests

API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1) Submit
resp = requests.post(
    "https://www.namifusion.com/api/v1/marketplace/run/flux-2-dev/edit",
    headers=HEADERS,
    json={
        "input": {
            "prompt": "Edit the product photo to a clean studio look: keep the object shape and camera angle unchanged, replace the background with a soft light-gray seamless backdrop, remove minor dust and scratches, enhance material detail, and change the accent color to #2E6BFF while preserving realistic reflections and shadows.",
            "images": [
                "https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/08/d9b3c7adadcf.jpeg"
            ],
            "size": "1024*1024",
            "seed": -1
        }
    },
)
resp.raise_for_status()  # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()

# 2) Poll until a terminal state (completed / failed / cancelled).
#    This model is allowed up to 1800s server-side.
deadline = time.time() + 1860
while task.get("status") not in ("completed", "failed", "cancelled"):
    if time.time() > deadline:
        raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
    time.sleep(3)
    poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
    poll.raise_for_status()
    task = poll.json()

print(task["status"], task.get("output"))
JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };

// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/flux-2-dev/edit", {
  method: "POST",
  headers: { ...HEADERS, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "prompt": "Edit the product photo to a clean studio look: keep the object shape and camera angle unchanged, replace the background with a soft light-gray seamless backdrop, remove minor dust and scratches, enhance material detail, and change the accent color to #2E6BFF while preserving realistic reflections and shadows.",
      "images": [
        "https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/08/d9b3c7adadcf.jpeg"
      ],
      "size": "1024*1024",
      "seed": -1
    }
  }),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();

// 2) Poll until a terminal state (completed / failed / cancelled).
//    This model is allowed up to 1800s server-side.
const deadline = Date.now() + 1860 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
  if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
  await new Promise((r) => setTimeout(r, 3000));
  const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
  if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
  task = await poll.json();
}

console.log(task.status, task.output);

文档

flux-2-dev/edit

flux-2-dev/edit

FLUX.2 [dev] Edit 是 Black Forest Labs 推出的高精度图像编辑模型,支持通过自然语言指令和精确的十六进制颜色控制进行图生图编辑,带来一致且具备影棚级质量的效果。提供开箱即用的 REST 推理 API,性能出色,无冷启动,价格实惠。

参数

参数类型必填默认值范围/说明
promptstring是—max 5000 chars; 用于生成的正向提示词。
imagesarray是—1–3 URLs; 用于编辑的输入图片 URL 列表。最多可上传 3 张图片。
sizestring否—max 500 chars; 生成媒体的尺寸(像素),格式为宽度*高度。
seedinteger否—用于生成的随机种子。设为 -1 表示使用随机种子。

Nami 图片参数使用 URL 数组,包括单图字段;多图编辑支持 1~3 张图片。

价格

每张生成图片 $0.024,即 2.4 积分。本接口采用固定价格。

与 WaveSpeed 官方标准标价一致;1 美元 = 100 积分。账户折扣另行计算。

API

curl -X POST https://www.namifusion.com/api/v1/marketplace/run/flux-2-dev/edit \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "prompt": "Edit the product photo to a clean studio look: keep the object shape and camera angle unchanged, replace the background with a soft light-gray seamless backdrop, remove minor dust and scratches, enhance material detail, and change the accent color to #2E6BFF while preserving realistic reflections and shadows.",
    "images": [
      "https://d1s3annbwribom.cloudfront.net/marketplace/examples/2026/10/08/d9b3c7adadcf.jpeg"
    ],
    "size": "1024*1024",
    "seed": -1
  }
}'
curl 'https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID' \
  -H "Authorization: Bearer $API_KEY"

提交后返回 task_uuid;轮询至 completed 或 failed。成功输出字段:output.images(URL 数组)。本 API 使用异步任务并返回 URL。

WaveSpeed

相关模型

xAI Grok Imagine Image v2.0 图片编辑
图生图X Ai

xAI Grok Imagine Image v2.0 图片编辑

xAI Grok Imagine Image V2.0 Edit 可根据文本提示词对输入图片进行编辑,并支持可配置的分辨率和质量,适用于精细图片编辑、视觉优化、创意变体、社交内容、营销素材和生产工作流。提供开箱即用的 REST 推理 API,性能出色,无冷启动,价格实惠。

起 $0.090 / 每次
qwen-image-edit-spicy
图生图

qwen-image-edit-spicy

通过文本指令精确编辑图片,可添加、移除或修改画面元素,也支持风格迁移和背景替换,适合照片修饰与视觉设计。

起 $0.034 / 每次
Qwen Image 3.0 Pro Edit|快速图片编辑
图生图Qwen Image 3.0 Pro

Qwen Image 3.0 Pro Edit|快速图片编辑

Qwen Image 3.0 Pro Edit 是一款专业级图片编辑模型,具备出色的画质和高级指令理解能力。最高支持 2k。提供开箱即用的 REST inference API,性能优异,无冷启动,价格实惠。

起 $0.0663 / 每次
OpenAI GPT Image 2.5 Sunburst 图像编辑
图生图OpenAI

OpenAI GPT Image 2.5 Sunburst 图像编辑

使用最多 16 张参考图片完成高保真、精确的图像编辑。

起 $0.220 / 每次
OpenAI GPT Image 2.5 Flare 图像编辑
图生图OpenAI

OpenAI GPT Image 2.5 Flare 图像编辑

使用自然语言指令和最多 16 张参考图片进行快速、均衡的图像编辑。

起 $0.220 / 每次
图生图
图生图NamiFusion

图片换头

将照片中的人物头部替换为参考图中的头部。先上传目标照片,再上传头部参考图。

起 $0.220 / 每次
Nano Banana 图像编辑
图生图Google

Nano Banana 图像编辑

高性价比智能修图。 无需蒙版即可实现物体替换与风格迁移,极速响应,成本低廉。

起 $0.038 / 每次
Nano Banana Pro 图像编辑
图生图Google

Nano Banana Pro 图像编辑

4K 语义级修图。基于自然语言修改现有图像,支持智能光影融合与图像内多语言文字编辑。

起 $0.140 / 每次