白底图V2
/image/v2/make/whiteBackgroundImageapplication/json请求体
基础参数
imageListarray[string]必填modestring必填resolutionstring必填widthinteger必填heightinteger必填出图数量
精修和随机裂变通过 outputNum 指定张数;单品和多件套裂变通过 typeCounts 指定各类图片张数,系统自动计算总张数。
outputNuminteger条件必填SINGLE、MULTI_SET 不传此参数
单任务输出上限:精修 4 张;随机裂变 20 张
typeCountsobject条件必填REFINE、RANDOM 不传此参数
单任务输出上限:单品裂变 8 张;多件套裂变 8 张
product_rotationinteger可选产品旋转张数handheldinteger可选手持展示张数functioninteger可选功能使用张数wearing_effectinteger可选穿戴效果张数product_with_effectinteger可选产品+使用张数product_with_handinteger可选产品+手持张数set_regular_matrixinteger可选整齐矩阵张数set_staggered_matrixinteger可选错位矩阵张数set_primary_secondaryinteger可选主辅展示张数set_matrix_with_useinteger可选矩阵+使用张数set_matrix_with_handinteger可选矩阵+手持张数typeCounts 未选择的生图方式直接省略,不填写 0。
比例与分辨率
请显式传入所需分辨率和输出宽高。
| 功能 | 支持比例 | 支持分辨率 | 输出尺寸 | 请求图片 |
|---|---|---|---|---|
| 白底图精修 | 自定义,长短边比例≤2.5 | 1K / 2K / 4K | 宽、高各600~4096像素 | 1张 |
| 随机裂变 | 自定义,长短边比例≤2.5 | 1K / 2K / 4K | 宽、高各600~4096像素 | 1~10张 |
| 单品裂变 | 自定义,长短边比例≤2.5 | 1K / 2K / 4K | 宽、高各600~4096像素 | 1~10张 |
| 多件套裂变 | 自定义,长短边比例≤2.5 | 1K / 2K / 4K | 宽、高各600~4096像素 | 1~10张 |
resolution指定生成分辨率档位,width、height指定最终输出尺寸。比例由宽高计算,不需要传入 aspectRatio。例如2048×819超过2.5限制,2048×820符合要求。
请求示例
示例图片地址需替换为实际可访问的商品图片 URL。
白底图精修
一张商品原图,生成两张精修白底图。
{
"imageList": ["https://example.com/product.jpg"],
"mode": "REFINE",
"resolution": "2K",
"width": 2048,
"height": 2048,
"outputNum": 2
}随机裂变
使用白底商品图,随机生成四张裂变图。
{
"imageList": ["https://example.com/product-white.png"],
"mode": "RANDOM",
"resolution": "2K",
"width": 2048,
"height": 2048,
"outputNum": 4
}单品裂变
生成两张产品旋转图、一张手持展示图,共三张。
{
"imageList": ["https://example.com/product-white.png"],
"mode": "SINGLE",
"resolution": "2K",
"width": 2048,
"height": 2048,
"typeCounts": {
"product_rotation": 2,
"handheld": 1
}
}多件套裂变
使用两张参考图,生成两张整齐矩阵图、一张主辅展示图,共三张。
{
"imageList": [
"https://example.com/product-a.png",
"https://example.com/product-b.png"
],
"mode": "MULTI_SET",
"resolution": "4K",
"width": 4096,
"height": 4096,
"typeCounts": {
"set_regular_matrix": 2,
"set_primary_secondary": 1
}
}提交后返回什么
提交成功后返回任务编号 data.id,表示任务已创建,结果还需等待生成。请保存编号。查看返回示例。
查询生成结果
用任务编号 data.id 调用获取作图结果(POST /image/v2/make/info),每次查询至少间隔10秒。data.status=3 表示成功;从成功图片项的 data.resultList[].url 获取地址。data.status=4 表示失败。查看统一示例。
逐图识别素材类型
单品裂变(mode=SINGLE)和多件套裂变(mode=MULTI_SET)在查询结果中,通过每张图片的 data.resultList[].extendField.type 标明素材类型。取值与请求 typeCounts 的键一致,含义见上方对应模式的生图方式说明。
data.resultList[].extendField.typestringproduct_rotation、handheld,多件套裂变的 set_regular_matrix、set_primary_secondary以下为上方单品裂变请求对应的成功结果片段(data 内):
{
"status": 3,
"resultList": [
{
"status": 1,
"url": "https://example.com/result-rotation-1.png",
"extendField": { "type": "product_rotation" }
},
{
"status": 1,
"url": "https://example.com/result-rotation-2.png",
"extendField": { "type": "product_rotation" }
},
{
"status": 1,
"url": "https://example.com/result-handheld.png",
"extendField": { "type": "handheld" }
}
]
}扣费标准
| 功能 | 扣费标准(点/张) |
|---|---|
| 白底图精修 | 1K:30;2K:50;4K:80 |
| 随机裂变 | 1K:30;2K:50;4K:80 |
| 单品裂变 | 1K:30;2K:50;4K:80 |
| 多件套裂变 | 1K:30;2K:50;4K:80 |
以上为基础单价,按输出张数计算;实际扣费以团队有效计费配置及扣费结果为准。
创建上限
| 配置项 | 上限 |
|---|---|
| 创建中 / 生成中任务上限 | 100 |