Qwen-Image-Edit-Max
复制成功!
立即体验加入对比
图像生成
概述
图像生成
千问图像编辑模型Max系列,提供更稳定、更丰富的编辑能力:提升工业设计与几何推理能力;提升角色一致性;减轻偏移问题;集成Lora能力,可以进行更多功能的图像编辑。
输入
文本图像
输出
图像
功能
定价
- 图片生成¥0.5每张
速率限制
- RPM每分钟请求数2
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-max",
messages=messages,
result_format='message',
stream=False,
n=2,
watermark=True,
negative_prompt=""
)
print(json.dumps(response, ensure_ascii=False))