Qwen
Endpoint: POST https://vod.intl.tencentcloudapi.comAction: CreateAigcImageTask
Qwen Image 是图片生成模型,支持文生图与参考图生成,输出尺寸 512×512~2048×2048。
基本信息
| 项目 | 值 |
|---|---|
| ModelName | Qwen |
| ModelVersion | 0925 |
| 默认值 | ModelVersion=0925 / AspectRatio=1:1 |
| 支持解除护栏 | 不支持 |
各版本支持规格
| 版本 | 输出规格 | 输入及条件 |
|---|---|---|
| 通用 | 比例:1:1 / 16:9 / 9:16 / 4:3 / 3:4自定义尺寸:VOD size: 512²–2048² 范围。MPS使用相应路径的示例值 | — |
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
ModelName | 必填 | String | 固定值 Qwen |
ModelVersion | 可选 | String | 0925 |
Prompt | 必填 | String | 生成提示词 |
FileInfos.N | 可选 | Array | 参考图片(image-to-image)。Category 为 Image |
OutputConfig.AspectRatio | 可选 | String | 1:1 / 16:9 / 9:16 / 4:3 / 3:4 等 |
OutputConfig.OutputImageCount | 可选 | Integer | 生成张数(各模型上限不同) |
ExtInfo | 可选 | String | 以 AdditionalParameters 的 size 直接指定分辨率(512²~2048²) |
请求示例
json
{
"SubAppId": 123456789,
"ModelName": "Qwen",
"ModelVersion": "0925",
"Prompt": "a serene japanese garden, soft morning light",
"OutputConfig": {
"AspectRatio": "1:1",
"OutputImageCount": 1,
"StorageMode": "Temporary"
},
"SessionContext": "job-001"
}参考图片请求
json
{
"SubAppId": 123456789,
"ModelName": "Qwen",
"ModelVersion": "0925",
"Prompt": "Change the background to a quiet garden; preserve the subject.",
"OutputConfig": {
"AspectRatio": "1:1",
"OutputImageCount": 1,
"StorageMode": "Temporary"
},
"SessionContext": "job-001",
"FileInfos": [
{
"Type": "Url",
"Category": "Image",
"Url": "https://<host>/reference.jpg"
}
]
}响应示例
json
{
"AigcImageTask": {
"Status": "FINISH",
"ErrCode": 0,
"Progress": 100,
"Output": {
"FileInfos": [
{
"FileUrl": "http://<host>.vod2.myqcloud.com/.../aigcImageGenFile.png",
"ExpireTime": "2026-08-01T10:29:48Z",
"MetaData": {
"Width": 1024,
"Height": 1024,
"Container": "png"
}
}
]
}
}
}