Vega Image
Endpoint: POST https://vod.intl.tencentcloudapi.comAction: CreateAigcImageTask
Vega Image 是 WAND 自研的图片生成模型,支持文生图与参考图编辑。提供 Pro / Flash / Lite 三个版本,生成结果可通过 DescribeTaskDetail 或完成事件确认。
基本信息
| 项目 | 值 |
|---|---|
| ModelName | wand-vega-image |
| ModelVersion | 1.0-pro / 1.0-flash / 1.0-lite |
| 输入 | 文本 / 参考图片 |
| 结果查询 | DescribeTaskDetail |
| 支持解除护栏 | 支持 |
各版本支持规格
| 版本 | 分辨率 | 比例 | 参考图片 |
|---|---|---|---|
1.0-pro | 1K / 2K / 4K | 1:1 / 2:3 / 3:2 / 3:4 / 4:3 / 9:16 / 16:9 / 21:9 | 最多 6 张 |
1.0-flash | 1K / 2K / 4K | 1:1 / 2:3 / 3:2 / 3:4 / 4:3 / 9:16 / 16:9 / 21:9 | 最多 6 张 |
1.0-lite | 1K / 2K / 4K | 1:1 / 2:3 / 3:2 / 3:4 / 4:3 / 9:16 / 16:9 / 21:9 | 最多 3 张 |
Resolution=2K、AspectRatio=16:9 的输出尺寸为 2560×1440。
参考图片规格
| 版本 | 参考图片数量 | 单文件容量 | 格式 |
|---|---|---|---|
1.0-pro | 最多 6 张 | 10MB 以下 | PNG / JPEG |
1.0-flash | 最多 6 张 | 10MB 以下 | PNG / JPEG |
1.0-lite | 最多 3 张 | 10MB 以下 | PNG / JPEG |
参考图片通过 FileInfos.Url 传递。单文件容量限制与图片数量限制分别适用。参考 URL 必须可被生成服务下载,非公开对象请使用有效的签名 URL。
生成示例

夏天乡间小路的插画

朝鲜时代出现的赛博机器人 / Pro / 2K
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
SubAppId | 必填 | Integer | VOD 应用程序 ID |
ModelName | 必填 | String | wand-vega-image |
ModelVersion | 必填 | String | 1.0-pro / 1.0-flash / 1.0-lite |
Prompt | 条件必填 | String | 生成或编辑指令。若无 FileInfos 则必填 |
FileInfos.N | 可选 | Array | 参考图片。Type=Url / File / Base64 |
FileInfos.N.Url | 条件必填 | String | Type=Url 时的图片 URL |
FileInfos.N.FileId | 条件必填 | String | Type=File 时的 VOD 媒体 ID |
FileInfos.N.Base64 | 条件必填 | String | Type=Base64 时图片的 Base64 字符串 |
OutputConfig.Resolution | 可选 | String | 输出分辨率 |
OutputConfig.AspectRatio | 可选 | String | 输出比例 |
OutputConfig.StorageMode | 可选 | String | Temporary / Permanent |
OutputConfig.LogoAdd | 可选 | String | 徽标水印。Enabled / Disabled |
OutputConfig.OutputImageCount | 可选 | Integer | 设置 Flash / Pro 的输出图片数量。示例使用 1 |
InputRegion | 可选 | String | 输入区域。海外请求为 Oversea |
请求示例
基于文本生成
json
{
"SubAppId": 123456789,
"ModelName": "wand-vega-image",
"ModelVersion": "1.0-pro",
"Prompt": "A cybernetic robot wearing hanbok-inspired armor and a gat in a Joseon palace courtyard, rain and lantern light, cinematic realism.",
"OutputConfig": {
"StorageMode": "Temporary",
"Resolution": "2K",
"AspectRatio": "16:9",
"LogoAdd": "Disabled"
}
}参考图片编辑
json
{
"SubAppId": 123456789,
"ModelName": "wand-vega-image",
"ModelVersion": "1.0-pro",
"Prompt": "Keep the person and bicycle. Change the season to autumn with warm orange foliage.",
"OutputConfig": {
"StorageMode": "Temporary",
"Resolution": "2K",
"AspectRatio": "16:9",
"LogoAdd": "Disabled",
"OutputImageCount": 1
},
"FileInfos": [
{
"Type": "Url",
"Url": ""
}
]
}Python SDK
python
import json
import os
from tencentcloud.common import credential
from tencentcloud.common.profile.client_profile import ClientProfile
from tencentcloud.common.profile.http_profile import HttpProfile
from tencentcloud.vod.v20180717 import vod_client, models
profile = ClientProfile
profile.httpProfile = HttpProfile
profile.httpProfile.endpoint = "vod.intl.tencentcloudapi.com"
client = vod_client.VodClient(
credential.Credential(
os.environ["TENCENTCLOUD_SECRET_ID"],
os.environ["TENCENTCLOUD_SECRET_KEY"],
),
"ap-singapore",
profile,
)
params = {
"SubAppId": 123456789,
"ModelName": "wand-vega-image",
"ModelVersion": "1.0-pro",
"Prompt": "A cybernetic robot in a Joseon palace courtyard, cinematic light",
"OutputConfig": {
"StorageMode": "Temporary",
"Resolution": "2K",
"AspectRatio": "16:9",
"LogoAdd": "Disabled",
},
}
request = models.CreateAigcImageTaskRequest
request.from_json_string(json.dumps(params))
response = client.CreateAigcImageTask(request)
print(response.to_json_string)响应与结果查询
生成请求返回 TaskId。
json
{
"TaskId": "1500033704-AigcImageTask-b988f28b31d06c2ba1fc9ad1428c02e8t",
"RequestId": "52ee718a-4423-409e-a96c-a7797d6879b6"
}向 DescribeTaskDetail 传递相同的 SubAppId 与 TaskId。
json
{
"SubAppId": 123456789,
"TaskId": "1500033704-AigcImageTask-b988f28b31d06c2ba1fc9ad1428c02e8t"
}为 AigcImageTask.Status=FINISH、ErrCode=0 时生成完成。图片地址在 AigcImageTask.Output.FileInfos.FileUrl 中返回。
json
{
"AigcImageTask": {
"Status": "FINISH",
"ErrCode": 0,
"Progress": 100,
"Output": {
"FileInfos": [
{
"FileUrl": "",
"MetaData": {
"Width": 2560,
"Height": 1440
}
}
]
}
}
}特殊设置
Base64 参考图片
使用 Type=Base64 与 Base64 字段。支持 JPEG / JPG / PNG / WEBP,编码前文件大小合计在 7MB 以下。不含 data:image/...;base64, 前缀。
python
import base64
with open("reference.png", "rb") as image:
params["FileInfos"] = [{
"Type": "Base64",
"Base64": base64.b64encode(image.read).decode("ascii"),
}]结果保存与完成事件
StorageMode=Temporary 返回临时结果 URL。要以 VOD 媒体保存请使用 Permanent。完成通知可使用普通回调或可信事件通知。认证与回调的通用规范参见 API Reference。