Qwen-Image-Edit-Plus
复制成功!
立即体验加入对比
图像生成
概述
图像生成
千问系列图像编辑Plus模型,在首版Edit模型基础上进一步优化了推理性能与系统稳定性,大幅缩短图像生成与编辑的响应时间;支持单次请求返回多张图片,显著提升用户体验。
输入
图像
输出
图像
功能
定价
- 图片生成¥0.2每张
速率限制
- RPM每分钟请求数120
API 参考
获取 API Key复制成功!
12345678910111213141516171819202122232425262728293031323334
import json
import os
from dashscope import MultiModalConversation
import dashscope
dashscope.base_http_api_url = 'https://dashscope.aliyuncs.com/api/v1'
messages = [
{
"role": "user",
"content": [
{"image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/thtclx/input1.png"},
{"image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/iclsnx/input2.png"},
{"image": "https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20250925/gborgw/input3.png"},
{"text": "图1中的女生穿着图2中的黑色裙子按图3的姿势坐下"}
]
}
]
# 若没有配置环境变量,请用百炼API Key将下行替换为:api_key="sk-xxx"
api_key = os.getenv("DASHSCOPE_API_KEY")
response = MultiModalConversation.call(
api_key=api_key,
model="qwen-image-edit-plus",
messages=messages,
result_format='message',
stream=False,
n=2,
watermark=True,
negative_prompt=""
)
print(json.dumps(response, ensure_ascii=False))