Qwen Image 2.1 Pro 图片编辑

alibaba/qwen-image-2.1-pro/edit

使用提示词和 1~10 张参考图编辑图片,单次生成 1~6 张。

示例

Qwen Image 2.1 Pro 图片编辑 示例 1

参数

名称类型默认约束说明
prompt *提示词textarea—≤ 5000 chars描述所需编辑效果的文本提示词,支持中文和英文,建议不超过 4500 Token。本模型不支持反向提示词,不希望出现的内容请直接写在提示词中(如“不要出现文字”)。要求抠图或透明背景时,模型会自动输出带透明通道的 PNG
images *参考图片image_upload—image/jpeg,image/jpg,image/png,image/bmp,image/tiff,image/webp,image/gif · 1–10 items用于编辑的参考图片,1-10 张。单张不超过 10MB,宽高 1-8000 像素(建议 384-2048 像素),长短边比不超过 10:1。多图时按顺序对应提示词中的图1、图2……图10。
n生成张数number11 ~ 6 · step 1单次生成 1-6 张图片,按成功生成的张数计费
size尺寸text—≤ 16 chars输出图片尺寸,格式为宽*高,总像素 512*512 至 2048*2048,宽高比 1:8 至 8:1。推荐:2048*2048(1:1)、2688*1536(16:9)、1536*2688(9:16)、2368*1728(4:3)、1728*2368(3:4)。留空时由模型自动推荐分辨率。
prompt_extend智能改写booleantrue—自动扩写优化提示词,官方建议开启,对短提示词效果提升明显
enable_thinking思考模式booleantrue—开启后增强推理以提升出图质量,但会增加生成耗时。仅在开启智能改写时生效
seed随机种子number—0 ~ 2147483647 · step 1用于结果复现,取值 0-2147483647,留空表示随机

输出字段

字段类型说明
imagesarray<string>

API

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

cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/alibaba/qwen-image-2.1-pro/edit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "Using image 1 as the main product reference and image 2 as the lifestyle scene reference, create a clean premium e-commerce hero image of the same leather handbag placed on a light beige stone pedestal in soft natural studio lighting. Keep the bag'\''s exact shape, color, stitching, hardware, and proportions consistent with the reference. Replace the background with a minimal warm neutral setting, add a subtle soft shadow under the bag, and remove any distracting props. No text, no watermark, no extra bags, no people, no logo changes.",
    "images": [
      "https://d1s3annbwribom.cloudfront.net/marketplace/examples/261013/default/254gkbbtuykh.jpeg",
      "https://d1s3annbwribom.cloudfront.net/marketplace/examples/261013/default/5f4s804daar9.jpeg"
    ],
    "n": 1,
    "size": "2048*2048",
    "prompt_extend": true,
    "enable_thinking": true,
    "seed": 12345
  }
}'

# 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/alibaba/qwen-image-2.1-pro/edit",
    headers=HEADERS,
    json={
        "input": {
            "prompt": "Using image 1 as the main product reference and image 2 as the lifestyle scene reference, create a clean premium e-commerce hero image of the same leather handbag placed on a light beige stone pedestal in soft natural studio lighting. Keep the bag's exact shape, color, stitching, hardware, and proportions consistent with the reference. Replace the background with a minimal warm neutral setting, add a subtle soft shadow under the bag, and remove any distracting props. No text, no watermark, no extra bags, no people, no logo changes.",
            "images": [
                "https://d1s3annbwribom.cloudfront.net/marketplace/examples/261013/default/254gkbbtuykh.jpeg",
                "https://d1s3annbwribom.cloudfront.net/marketplace/examples/261013/default/5f4s804daar9.jpeg"
            ],
            "n": 1,
            "size": "2048*2048",
            "prompt_extend": True,
            "enable_thinking": True,
            "seed": 12345
        }
    },
)
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/alibaba/qwen-image-2.1-pro/edit", {
  method: "POST",
  headers: { ...HEADERS, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "prompt": "Using image 1 as the main product reference and image 2 as the lifestyle scene reference, create a clean premium e-commerce hero image of the same leather handbag placed on a light beige stone pedestal in soft natural studio lighting. Keep the bag's exact shape, color, stitching, hardware, and proportions consistent with the reference. Replace the background with a minimal warm neutral setting, add a subtle soft shadow under the bag, and remove any distracting props. No text, no watermark, no extra bags, no people, no logo changes.",
      "images": [
        "https://d1s3annbwribom.cloudfront.net/marketplace/examples/261013/default/254gkbbtuykh.jpeg",
        "https://d1s3annbwribom.cloudfront.net/marketplace/examples/261013/default/5f4s804daar9.jpeg"
      ],
      "n": 1,
      "size": "2048*2048",
      "prompt_extend": true,
      "enable_thinking": true,
      "seed": 12345
    }
  }),
});
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);

文档

Qwen Image 2.1 Pro 图片编辑

alibaba/qwen-image-2.1-pro/edit

使用提示词和 1~10 张参考图编辑图片,单次生成 1~6 张。

参数

ParameterTypeRequiredDefaultDescription
promptstringtrue—描述所需编辑效果的文本提示词,支持中文和英文,建议不超过 4500 Token。本模型不支持反向提示词,不希望出现的内容请直接写在提示词中(如“不要出现文字”)。要求抠图或透明背景时,模型会自动输出带透明通道的 PNG; max 5000 characters
imagesarraytrue—用于编辑的参考图片,1-10 张。单张不超过 10MB,宽高 1-8000 像素(建议 384-2048 像素),长短边比不超过 10:1。多图时按顺序对应提示词中的图1、图2……图10。; 1–10 URLs
nintegerfalse1单次生成 1-6 张图片,按成功生成的张数计费 [1, 6]
sizestringfalse—输出图片尺寸,格式为宽高,总像素 512512 至 20482048,宽高比 1:8 至 8:1。推荐:20482048(1:1)、26881536(16:9)、15362688(9:16)、23681728(4:3)、17282368(3:4)。留空时由模型自动推荐分辨率。; max 16 characters
prompt_extendbooleanfalsetrue自动扩写优化提示词,官方建议开启,对短提示词效果提升明显
enable_thinkingbooleanfalsetrue开启后增强推理以提升出图质量,但会增加生成耗时。仅在开启智能改写时生效
seedintegerfalse—用于结果复现,取值 0-2147483647,留空表示随机 [0, 2.14748e+09]

价格

每张成功生成的图片 $0.04(4 积分)。按请求 n 预扣,按实际成功输出张数结算。参考图片、输出尺寸、提示词扩展均不额外收费。默认 n=1。

size 使用宽*高格式,总像素为 512²~2048²,宽高比 1:8~8:1;省略时自动选择。省略 seed 使用随机种子。enable_thinking 仅在 prompt_extend=true 时生效。

采用 Alibaba International 国际部署标准美元标价。1 美元=100 积分,账户折扣另行计算。

API

curl -X POST https://www.namifusion.com/api/v1/marketplace/run/alibaba/qwen-image-2.1-pro/edit \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "n": 1,
    "seed": 12345,
    "size": "2048*2048",
    "images": [
      "https://d1s3annbwribom.cloudfront.net/marketplace/examples/261013/default/254gkbbtuykh.jpeg",
      "https://d1s3annbwribom.cloudfront.net/marketplace/examples/261013/default/5f4s804daar9.jpeg"
    ],
    "prompt": "Using image 1 as the main product reference and image 2 as the lifestyle scene reference, create a clean premium e-commerce hero image of the same leather handbag placed on a light beige stone pedestal in soft natural studio lighting. Keep the bag'"'"'s exact shape, color, stitching, hardware, and proportions consistent with the reference. Replace the background with a minimal warm neutral setting, add a subtle soft shadow under the bag, and remove any distracting props. No text, no watermark, no extra bags, no people, no logo changes.",
    "prompt_extend": true,
    "enable_thinking": true
  }
}'
curl 'https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID' \
  -H "Authorization: Bearer $API_KEY"

使用 task_uuid 轮询至 completed 或 failed。成功时 output.images 为输出 URL 字符串数组。

Alibaba official pricing

相关模型

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 / 每次