Qwen-Image-2.0

复制成功!
立即体验加入对比
图像生成

概述

图像生成

Qwen-Image-2.0系列加速版模型,实现了图片生成和图片编辑的融合;具备更专业的文字渲染1k token指令支持能力、更细腻的真实质感,细腻刻画写实场景、更强的语义遵循能力。加速版有效实现了模型效果和性能的最佳平衡。该版本为2026年3月3日快照。

输入

文本图像

输出

图像

功能

前缀补全

函数调用

缓存

结构化输出

批量任务

联网搜索

微调

定价

  • 图片生成
    ¥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-2.0-2026-03-03",
    messages=messages,
    result_format='message',
    stream=False,
    n=2,
    watermark=True,
    negative_prompt=""
)

print(json.dumps(response, ensure_ascii=False))