---
title: qwen-2.1-edit-image API — Qwen 2.1 定价与规格 | RunAPI
description: 通过 RunAPI 使用 qwen-2.1-edit-image——Qwen 2.1 系列。按次计费，包含模型 ID、规格参数和开发者接入指南。
url: https://runapi.ai/zh-CN/models/qwen-2.1/edit-image.md
canonical: https://runapi.ai/zh-CN/models/qwen-2.1/edit-image
locale: zh-CN
site: RunAPI
image: https://runapi.ai/assets/opengraph-bfaaa0f0.png
alternates:
  en: https://runapi.ai/models/qwen-2.1/edit-image
  zh-CN: https://runapi.ai/zh-CN/models/qwen-2.1/edit-image
  es: https://runapi.ai/es/models/qwen-2.1/edit-image
  ja: https://runapi.ai/ja/models/qwen-2.1/edit-image
  de: https://runapi.ai/de/models/qwen-2.1/edit-image
  fr: https://runapi.ai/fr/models/qwen-2.1/edit-image
  pt-BR: https://runapi.ai/pt-BR/models/qwen-2.1/edit-image
  ko: https://runapi.ai/ko/models/qwen-2.1/edit-image
  it: https://runapi.ai/it/models/qwen-2.1/edit-image
  nl: https://runapi.ai/nl/models/qwen-2.1/edit-image
  pl: https://runapi.ai/pl/models/qwen-2.1/edit-image
  tr: https://runapi.ai/tr/models/qwen-2.1/edit-image
  zh-TW: https://runapi.ai/zh-TW/models/qwen-2.1/edit-image
  zh-HK: https://runapi.ai/zh-HK/models/qwen-2.1/edit-image
  ar: https://runapi.ai/ar/models/qwen-2.1/edit-image
  x-default: https://runapi.ai/models/qwen-2.1/edit-image
model: Qwen 2.1
provider: Alibaba
variant_id: qwen-2.1-edit-image
sdk_model_id: qwen-2.1-edit-image
modality: image
billing_unit: 次调用
status: upcoming
---

> HTML version: https://runapi.ai/zh-CN/models/qwen-2.1/edit-image
> Site index for agents: https://runapi.ai/llms.txt


# qwen-2.1-edit-image API

**即将上线:** 该模型尚未在 RunAPI 上线，API 调用将在发布时开放。

通过 RunAPI 使用 Qwen 2.1 系列的 qwen-2.1-edit-image。按次计费，无需订阅，失败的生成不计费。

**Alibaba / [Qwen 2.1](https://runapi.ai/zh-CN/models/qwen-2.1.md)**
**即将上线 · image · 可商用**




### 切换变体

- **qwen-2.1-edit-image** (current)
- [qwen-2.1-text-to-image](https://runapi.ai/zh-CN/models/qwen-2.1/text-to-image.md)

2 个版本可用





qwen-2.1-edit-image 在 Qwen 2.1 家族中处于质量与成本的最佳平衡点。

- USD 按次定价
- 失败不计费
- 模型支持时流式
- 各模型的请求参数与能力限制
- 只需更改一个 model ID 参数即可切换 variant
- 跨所有模型与提供方统一计费




## 技术细节

| 字段 | 值 |
|---|---|
| 提供商 | Alibaba |
| 模型 ID | qwen-2.1-edit-image |
| 模态 | 图像 |
| 任务类型 | Asynchronous |
| API 端点 | [/api/v1/qwen_2_1/edit_image](https://runapi.ai/zh-CN/docs/api/qwen-2-1/edit-image) |
| 计费单位 | 次调用 |
| 输入参数 | aspect_ratio, background, callback_url, enable_prompt_expansion, mask_url, model, output_format, output_resolution, prompt, seed, source_image_urls |
| 最大分辨率 | 1k, 2k |
| 宽高比 | auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21 |
| 输出格式 | png, webp, jpeg |
| 目录状态 | 即将上线 |



**工作原理**

## 3 步使用此模型

1. **获取 API 密钥** - 免费注册后，在控制台创建用于 qwen-2.1-edit-image 的 API 密钥。
2. **发送请求** - 向 /api/v1/qwen_2_1/edit_image 发送 POST 请求，并传入 qwen-2.1-edit-image 模型 ID 和参数。
3. **获取结果** - 轮询任务或按照回调获取已完成的 qwen-2.1-edit-image 结果。



<!-- catalog-model-detail-slot: feature-cards -->

## 该模型的核心能力

- **输出分辨率** — 根据已发布的 endpoint 规格，支持 1k, 2k。
- **灵活的参数配置** — 可配置文档中列出的 9 个参数，包括 aspect_ratio, background, enable_prompt_expansion, mask_url, output_format。
- **Endpoint 覆盖** — 提供 1 个公开 endpoint：edit_image。
- **Webhook 推送** — 异步任务支持回调 URL，任务完成时发送通知。
<!-- /catalog-model-detail-slot: feature-cards -->



**API 参考**

## 端点规格

| Field | Value |
|---|---|
| 端点 | `POST /api/v1/qwen_2_1/edit_image` |
| 模型 ID | `qwen-2.1-edit-image` |
| 任务类型 | `edit_image` |
| 最大时长 | `暂无数据` |
| 分辨率 | `1k, 2k` |
| 宽高比 | `auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21` |
| 输出格式 | `PNG, WEBP, JPEG` |
| 平均生成时间 | `暂无数据` |


<!-- catalog-model-detail-slot: request-parameters -->

## 请求参数

### `seed`

**可选** · `integer`

Integer seed for reproducible results; omit for a random seed.

### `prompt`

**必填** · `string`

Image editing prompt. With mask_url, describes what to generate inside the white area of the mask.

### `mask_url`

**可选** · `string`

Public mask image URL for local editing: white marks the area to change, black is kept. Requires exactly one source image and cannot be combined with a transparent background; aspect_ratio and enable_prompt_expansion are ignored.

### `background`

**可选** · `string`

Background type. A transparent background requires output_format png or webp and cannot be combined with mask_url; describe only the subject in the prompt. (opaque, transparent)

### `aspect_ratio`

**可选** · `string`

Output aspect ratio. auto follows the first source image. Ignored when mask_url is set. (auto, 1:1, 4:3, 3:4, 3:2, 2:3, 16:9, 9:16, 21:9, 9:21)

### `callback_url`

**可选** · `string`

Webhook URL for asynchronous task updates.

### `output_format`

**可选** · `string`

Output image format. jpeg cannot be combined with a transparent background. (png, webp, jpeg)

### `output_resolution`

**可选** · `string`

Output image resolution. (1k, 2k)

### `source_image_urls`

**必填** · `array`

Public source image URLs; one to ten images, in the order the prompt refers to them.

### `enable_prompt_expansion`

**可选** · `boolean`

Whether RunAPI expands the prompt before generation. Ignored when mask_url is set.

<!-- /catalog-model-detail-slot: request-parameters -->

**Request example**

```json
{
  "model": "qwen-2.1-edit-image",
  "source_image_urls": [
    "https://cdn.runapi.ai/public/samples/image.jpg"
  ],
  "prompt": "生成一张 4K 的产品 hero 图：哑光黑色水瓶放在米色石面上，侧光柔和。"
}
```

### 模型 Skill — qwen-2.1-edit-image

安装一次 skill，开发时使用本页的变体 ID。

```sh
npx skills add runapi-ai/qwen-2.1 -g
```

```text
Install the Qwen 2.1 skill for this app:

1. Add runapi-ai/qwen-2.1 with the skills installer.
2. Load SKILL.md in this workspace.
3. Use its docs, schemas, pricing notes, and setup steps with model ID qwen-2.1-edit-image.
4. Confirm the install path when done.
```

### 用 model skill 使用 qwen-2.1-edit-image

1. **安装** — 安装该模型线对应的 model skill。
2. **配置** — 把 model 字段设置为本页展示的完整模型 ID。
3. **调用** — 按 skill 说明把提示词、输入文件和回调处理接入应用。
4. **接收** — 从 RunAPI 读取任务响应、webhook 回调或缓存输出 URL。

### qwen-2.1-edit-image 与其它变体的差异

- **VS QWEN-2.1-TEXT-TO-IMAGE: Qwen 2.1 图生图，最多十张源图，支持蒙版局部编辑** — Qwen 2.1 文生图，支持 1K 和 2K 及透明背景

## 应用场景

**产品摄影**

为缺少棚拍照片的电商商品自动生成场景化产品图。

**游戏与概念设计**

快速概念化环境和角色，再进入最终美术制作。

**编辑配图**

为博客文章和专栏批量生成独特封面图和插图。



## Qwen 2.1 edit image 常见问题

### 如何选择 qwen-2.1-edit-image？

传入 quickstart 中显示的模型 ID。

### 该变体的限流？

Key 级限流随使用层级伸缩。当前限制见定价页。

### 能切到其它变体吗？

可以——变体只是参数，改 model 字段即可。

### 支持流式吗？

模型支持流式时，RunAPI 端到端流式。

### 质量问题在哪里报？

在公共 GitHub 仓库提 issue 或邮件联系 support。

### 需要单独的提供方账户吗？

不需要。你的 RunAPI API key 足以访问此 variant 以及目录中的所有其他模型，无需底层提供方账户。


### 相关

- [qwen-2.1-text-to-image](https://runapi.ai/zh-CN/models/qwen-2.1/text-to-image.md) — 由 Alibaba 提供 · 即将上线
- [Flux](https://runapi.ai/zh-CN/models/flux.md) — 由 Black Forest Labs 提供 · $0.04 / 次调用
- [Flux 2](https://runapi.ai/zh-CN/models/flux-2.md) — 由 Black Forest Labs 提供 · $0.04 / 次调用
- [Flux Kontext](https://runapi.ai/zh-CN/models/flux-kontext.md) — 由 Black Forest Labs 提供 · $0.03 / 次调用

### 立即体验 Qwen 2.1。

- [免费注册](https://runapi.ai/zh-CN/login)
- [阅读快速开始 →](https://runapi.ai/zh-CN/docs/api/qwen-2-1/edit-image)
## 需要团队接入支持？

我们可以协助团队接入、完成系统集成并解答技术问题。

[联系我们](https://runapi.ai/zh-CN/contact.md)



---

## More from RunAPI

- [Home](https://runapi.ai/zh-CN/.md)
### 产品
- [模型目录](https://runapi.ai/zh-CN/models.md)
- [定价](https://runapi.ai/zh-CN/pricing.md)
- [提供方](https://runapi.ai/zh-CN/models#all-models)
- [提示词库](https://runapi.ai/zh-CN/prompts.md)
### 开发者
- [文档](https://runapi.ai/zh-CN/docs/guides)
- [SDK](https://runapi.ai/zh-CN/sdk.md)
- [CLI](https://runapi.ai/zh-CN/cli.md)
- [MCP Server](https://runapi.ai/zh-CN/mcp.md)
- [x402](https://runapi.ai/zh-CN/x402.md)
### 指南
- [Claude Code 与 Cursor](https://runapi.ai/zh-CN/claude-code-vs-cursor.md)
- [Cursor API 设置](https://runapi.ai/zh-CN/cursor-api-setup.md)
- [RunAPI 与 OpenRouter](https://runapi.ai/zh-CN/openrouter-alternative.md)
### 公司
- [企业版](https://runapi.ai/zh-CN/contact.md)
- [邀请返利](https://runapi.ai/zh-CN/referral-program.md)
- [联系](https://runapi.ai/zh-CN/contact.md)
### 法律
- [服务条款](https://runapi.ai/zh-CN/terms.md)
- [隐私政策](https://runapi.ai/zh-CN/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-CN",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-CN",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-CN/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-CN",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-CN",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-CN",
    "@type": "SoftwareApplication",
    "name": "Qwen 2.1 qwen-2.1-edit-image",
    "applicationCategory": "DeveloperApplication"
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-CN",
    "@type": "BreadcrumbList",
    "itemListElement": [
      {
        "@type": "ListItem",
        "position": 1,
        "name": "Home",
        "item": "https://runapi.ai/zh-CN"
      },
      {
        "@type": "ListItem",
        "position": 2,
        "name": "Models",
        "item": "https://runapi.ai/zh-CN/models"
      },
      {
        "@type": "ListItem",
        "position": 3,
        "name": "Qwen 2.1",
        "item": "https://runapi.ai/zh-CN/models/qwen-2.1"
      },
      {
        "@type": "ListItem",
        "position": 4,
        "name": "qwen-2.1-edit-image",
        "item": "https://runapi.ai/zh-CN/models/qwen-2.1/edit-image"
      }
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-CN",
    "@type": "FAQPage",
    "mainEntity": [
      {
        "@type": "Question",
        "name": "如何选择 qwen-2.1-edit-image？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "传入 quickstart 中显示的模型 ID。"
        }
      },
      {
        "@type": "Question",
        "name": "该变体的限流？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "Key 级限流随使用层级伸缩。当前限制见定价页。"
        }
      },
      {
        "@type": "Question",
        "name": "能切到其它变体吗？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "可以——变体只是参数，改 model 字段即可。"
        }
      },
      {
        "@type": "Question",
        "name": "支持流式吗？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "模型支持流式时，RunAPI 端到端流式。"
        }
      },
      {
        "@type": "Question",
        "name": "质量问题在哪里报？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "在公共 GitHub 仓库提 issue 或邮件联系 support。"
        }
      },
      {
        "@type": "Question",
        "name": "需要单独的提供方账户吗？",
        "acceptedAnswer": {
          "@type": "Answer",
          "text": "不需要。你的 RunAPI API key 足以访问此 variant 以及目录中的所有其他模型，无需底层提供方账户。"
        }
      }
    ]
  }
]
```
