Overview
The Qwen series of image-generation models boasts exceptional text-rendering capabilities and excels in complex text rendering as well as a wide range of generation and editing tasks. This version, a snapshot taken on January 9, 2026, is a distilled and accelerated variant of Qwen-Image-Max, enabling faster generation of high-quality images.
Input
Text
Output
Image
Features
Prefix Completion
Enable Partial Mode when calling the Qwen API to make the model continue strictly from your provided prefix text.View docsFunction Calling
Use function calling to connect large language models with external tools and systems.View docsCache
Context Cache stores shared prefixes for long-context requests to reduce repeated computation, improve latency, and lower cost.View docsStructured Outputs
Structured Outputs help ensure the model returns a JSON string in the expected format.View docsPricing
- Image Generation$0.03Per image
Rate Limits
- RPMRequests Per Minute120
API Reference
Call APICopy success!
1234567891011121314151617181920212223242526272829303132333435363738
import json
import os
import dashscope
from dashscope import MultiModalConversation
dashscope.base_http_api_url = 'https://maas.qwencloudapi.com/api/v1'
messages = [
{
"role": "user",
"content": [
{"text": "An elegant and solemn couplet hangs in a hall. The room features tranquil, classic Chinese decor. On the table are several blue and white porcelain items. The left scroll of the couplet reads, "Righteousness is the root of innate knowledge. Humans and machines share the same path and excel in innovative thinking (Chinese: 义本生知人机同道善思新)". The right scroll reads, "Connecting to the cloud imparts wisdom. The cosmos reveals its patterns and inspires lofty ambitions (Chinese: 通云赋智乾坤启数高志远)". The horizontal scroll reads, "Wisdom enlightens Tongyi (Chinese: 智启通义)". The calligraphy is flowing. A Chinese-style painting of Yueyang Tower hangs in the middle."}
]
}
]
# If the environment variable is not set, replace it with your Model Studio API key: api_key="sk-xxx"
api_key = os.getenv("DASHSCOPE_API_KEY")
response = MultiModalConversation.call(
api_key=api_key,
model="qwen-image-plus-2026-01-09",
messages=messages,
result_format='message',
stream=False,
watermark=False,
prompt_extend=True,
negative_prompt='',
size='1328*1328'
)
if response.status_code == 200:
print(json.dumps(response, ensure_ascii=False))
else:
print(f"HTTP status code: {response.status_code}")
print(f"Error code: {response.code}")
print(f"Error message: {response.message}")
print("For more information, see the documentation: https://www.alibabacloud.com/help/en/model-studio/error-code")