Qwen 图像编辑 API
利用阿里巴巴先进的 Qwen 图像编辑 API 进行编程化图片处理。上传图片、定义蒙版,并大规模执行复杂的指令式编辑——从文字修正到物体移除。
Upload 1-3 reference images to start editing. Supported formats: jpg, png, webp, bmp, tiff.
A cute fluffy cat captain sitting in a spaceship commander chair, wearing a small headset and a futuristic collar. Pixar animation style, 3D render, vibrant colors, soft volumetric lighting. The cockpit is cozy with round shapes, galaxy background outside the window. Octane render, high fidelity, adorable expression.

Upload up to 3 images (max 10MB each)
Click to upload or drag and drop
Supported formats: JPG, JPEG, PNG, BMP, WEBP, TIFF
Maximum file size: 10MB; Maximum files: 3

History
最多保留20条0 运行中 · 0 已完成
Pricing
使用 Qwen 图像编辑 API 自动化修图
使用自然语言指令执行精准的区域编辑。Qwen 图像编辑 API 能够处理局部重绘、双语文字修改以及背景替换,适用于大批量工作流。

Qwen 图像编辑 API 的能力
为什么开发者选择 Qwen 图像编辑 API
以极具竞争力的价格获取业界领先的语义理解能力,实现基于指令的编辑。
基于指令的控制
使用自然语言(例如“把衬衫改成红色”)引导 Qwen 图像编辑 API,无需复杂的参数微调。
高保真局部重绘
模型理解上下文,确保编辑区域与原始光照和透视完美融合。
高性价比扩展
通过平均每次成功编辑 $0.03–$0.05 的 Token 计费模式,降低运营成本。
如何集成 Qwen 图像编辑 API
处理复杂图像修改的简单“请求-响应”流程。
第 1 步 — 构建请求参数
向端点发送包含 Base64 或 URL 格式底图以及可选蒙版图的 POST 请求。
第 2 步 — 定义指令
向 Qwen 图像编辑 API 传递描述所需更改的文本提示词(例如“把猫换成狗”)。
第 3 步 — 获取与部署
在 JSON 响应中接收处理后的图片 URL,即可立即在您的应用程序中展示。
API 核心特性
专为精细控制和自动化设计
蒙版引导局部重绘
使用二进制蒙版将编辑限制在特定像素范围内。
多图批处理
单次 API 调用处理小批量(最多 3 张)图片。
场景重构
替换背景同时保持主体景深正确。
文字风格保留
修改内嵌文字而不破坏视觉设计。
双语指令
原生支持复杂的中英文提示词。
透明定价
Qwen 图像编辑 API 采用按次付费模式(约 $0.04)。
Qwen 图像编辑 API vs. 替代方案
为您的技术栈选择合适的编程化编辑器
| 模型 | 类别 | 核心能力 | 输出尺寸 | 计费方式 | 最适用场景 |
|---|---|---|---|---|---|
| Qwen 图像编辑 API | 图像编辑 | 蒙版引导局部重绘、文字替换、局部修饰 | 灵活(取决于输入) | 按成功编辑计费(用量计费) | 需要精准局部编辑和文字替换的编程化图像编辑工作流 |
| Wan 2.5 图生图 | 图像变体 / 风格迁移 | 基于参考图的变体和重度风格迁移 | 高清输出(取决于配置) | 用量计费 | 从参考图创建变体和风格转换(通常不太适合精准的局部文字编辑) |
| Nano Banana 2 | 文生图 | 通用图像生成 | 1024px 基础(取决于配置) | 用量计费 | 不需要蒙版引导局部编辑或文字保留修饰时的通用生成 |
Qwen 图像编辑 API 常见问题解答
Everything you need to know about the product and billing.
API Reference
Select endpoint
Authentication
All APIs require Bearer Token authentication.
Authorization:
Bearer YOUR_API_KEY/v1/images/generationsGenerate Image
Create an image generation task using text prompts or reference images. Supports text-to-image, image-to-image, and image editing modes.
Asynchronous processing mode, use the returned task ID to .
Generated image links are valid for 24 hours, please save them promptly.
Request Parameters
modelstringRequiredDefault: qwen-image-editImage generation model name.
qwen-image-editpromptstringRequiredPrompt describing the image to be generated or how to edit the input image.
Notes
- Limited to 2000 tokens
A cat playing in the grassimage_urlsarrayRequiredReference image URL list for image editing.
Notes
- Max 3 images per request
- Image dimensions must be within 384-3072 pixels
- Formats: .jpg, .jpeg, .png, .bmp, .webp, .tiff
- URLs must be directly accessible by the server
https://example.com/image1.pngcallback_urlstringOptionalHTTPS callback address after task completion.
Notes
- Triggered on completion, failure, or cancellation
- Sent after billing confirmation
- HTTPS only, no internal IPs
- Max length: 2048 chars
- Timeout: 10s, Max 3 retries
https://your-domain.com/webhooks/image-task-completed

