@alicloud/aidge20260428 5.12.2 → 5.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.d.ts +153 -94
- package/dist/client.js +212 -94
- package/dist/client.js.map +1 -1
- package/dist/models/AiTryOnRequest.d.ts +43 -5
- package/dist/models/AiTryOnRequest.js +10 -0
- package/dist/models/AiTryOnRequest.js.map +1 -1
- package/dist/models/AiTryOnResponseBody.d.ts +4 -2
- package/dist/models/AiTryOnResponseBody.js.map +1 -1
- package/dist/models/DocumentTranslateRequest.d.ts +10 -7
- package/dist/models/DocumentTranslateRequest.js.map +1 -1
- package/dist/models/DocumentTranslateResponseBody.d.ts +3 -3
- package/dist/models/ProductVideoGenerationRequest.d.ts +62 -0
- package/dist/models/ProductVideoGenerationRequest.js +71 -0
- package/dist/models/ProductVideoGenerationRequest.js.map +1 -0
- package/dist/models/ProductVideoGenerationResponse.d.ts +19 -0
- package/dist/models/ProductVideoGenerationResponse.js +69 -0
- package/dist/models/ProductVideoGenerationResponse.js.map +1 -0
- package/dist/models/ProductVideoGenerationResponseBody.d.ts +86 -0
- package/dist/models/ProductVideoGenerationResponseBody.js +92 -0
- package/dist/models/ProductVideoGenerationResponseBody.js.map +1 -0
- package/dist/models/ProductVideoGenerationShrinkRequest.d.ts +62 -0
- package/dist/models/ProductVideoGenerationShrinkRequest.js +68 -0
- package/dist/models/ProductVideoGenerationShrinkRequest.js.map +1 -0
- package/dist/models/VirtualTryOnRequest.d.ts +2 -2
- package/dist/models/VirtualTryOnResponseBody.d.ts +8 -7
- package/dist/models/VirtualTryOnResponseBody.js.map +1 -1
- package/dist/models/model.d.ts +5 -0
- package/dist/models/model.js +15 -5
- package/dist/models/model.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +228 -96
- package/src/models/AiTryOnRequest.ts +53 -5
- package/src/models/AiTryOnResponseBody.ts +4 -2
- package/src/models/DocumentTranslateRequest.ts +10 -7
- package/src/models/DocumentTranslateResponseBody.ts +3 -3
- package/src/models/ProductVideoGenerationRequest.ts +88 -0
- package/src/models/ProductVideoGenerationResponse.ts +40 -0
- package/src/models/ProductVideoGenerationResponseBody.ts +124 -0
- package/src/models/ProductVideoGenerationShrinkRequest.ts +85 -0
- package/src/models/VirtualTryOnRequest.ts +2 -2
- package/src/models/VirtualTryOnResponseBody.ts +8 -7
- package/src/models/model.ts +5 -0
package/dist/client.js
CHANGED
|
@@ -113,38 +113,38 @@ class Client extends openapi_core_1.default {
|
|
|
113
113
|
return await this.addDisplayKnowledgeWithOptions(request, runtime);
|
|
114
114
|
}
|
|
115
115
|
/**
|
|
116
|
-
* Generates
|
|
116
|
+
* Generates virtual try-on images by applying specified garments to a model image based on AI algorithms. It preserves the model\\"s pose, facial features, and background details while ensuring a realistic fit. Users can obtain the processed images by providing the URLs of the original product and model images.
|
|
117
117
|
*
|
|
118
118
|
* @remarks
|
|
119
119
|
* ## Scenarios
|
|
120
120
|
* - **Virtual try-on for clothing:**
|
|
121
|
-
* Supports various clothing categories such as tops, bottoms, jumpsuits, and dresses. After
|
|
121
|
+
* Supports various clothing categories such as tops, bottoms, jumpsuits, and dresses. After users upload a model image and a product image, the system generates natural and realistic try-on effects to intuitively display how the clothing looks on the model.
|
|
122
122
|
* - **Virtual try-on for shoes and hats:**
|
|
123
|
-
* Supports virtual try-on for products such as shoes and hats.
|
|
123
|
+
* Supports virtual try-on for products such as shoes and hats. It intelligently matches the position and proportion of the product based on the model\\"s pose and body parts, presenting a coordinated and realistic wearing effect.
|
|
124
124
|
* - **E-commerce product display and marketing:**
|
|
125
125
|
* Helps merchants quickly generate model try-on images for different products, reducing the costs of traditional photography, outfit changes, and post-production, and improving the production efficiency of product images.
|
|
126
126
|
* - **Online shopping experience optimization:**
|
|
127
|
-
*
|
|
127
|
+
* Consumers can preview the wearing effect of products through virtual try-on, more intuitively understand the style, matching, and overall effect of the products, assist in purchase decisions, and enhance the shopping experience.
|
|
128
128
|
* ## Features
|
|
129
|
-
* - **First,
|
|
130
|
-
* - a. Model image:
|
|
131
|
-
* - b. Product image:
|
|
132
|
-
* - **Second,
|
|
133
|
-
* - a. Specify product type:
|
|
134
|
-
* - b. Automatic type recognition:
|
|
135
|
-
* - **Finally, the system
|
|
136
|
-
* - a. Preserve model details:
|
|
137
|
-
* - b. Maintain image consistency:
|
|
138
|
-
* - c. Generate try-on effect:
|
|
129
|
+
* - **First, users need to input a model image and a product image. The system uses the model image as the try-on subject and applies the garment from the product image to the model:**
|
|
130
|
+
* - a. Model image: the image of the person who needs to perform the virtual try-on.
|
|
131
|
+
* - b. Product image: the image of the clothing, shoes, or hat to be worn by the model.
|
|
132
|
+
* - **Second, users can select the corresponding product type based on the actual product. Supported types include tops, bottoms, jumpsuits, dresses, shoes, and hats:**
|
|
133
|
+
* - a. Specify product type: users can directly input the type of the current product, and the system will process it according to the specified type.
|
|
134
|
+
* - b. Automatic type recognition: if the user does not input the product type, the system will automatically recognize the product category in the product image and perform the virtual try-on based on the recognition result.
|
|
135
|
+
* - **Finally, the system combines the model image, product image, and product type to generate a virtual try-on image, displaying the wearing effect of the product on the model:**
|
|
136
|
+
* - a. Preserve model details: the generation process does not adjust the appearance, hairstyle, pose, body shape, and other details of the person in the original model image.
|
|
137
|
+
* - b. Maintain image consistency: the background, composition, lighting, and overall visual effect of the original model image remain unchanged, and only the wearing area corresponding to the product is processed.
|
|
138
|
+
* - c. Generate try-on effect: naturally apply the product to the model, making it fit the person\\"s pose and body structure, and generate a coordinated and realistic virtual try-on image.
|
|
139
139
|
* ## Examples
|
|
140
|
-
* | **Type** | **Model image** | **
|
|
140
|
+
* | **Type** | **Model image** | **Garment image** | **Try-on result image** |
|
|
141
141
|
* | --- | --- | --- | --- |
|
|
142
|
-
* |
|
|
143
|
-
* |
|
|
142
|
+
* | Top |  |  |  |
|
|
143
|
+
* | Bottom |  |  |  |
|
|
144
144
|
* | Shoes |  |  |  |
|
|
145
|
-
* |
|
|
146
|
-
* |
|
|
147
|
-
* |
|
|
145
|
+
* | Jumpsuit |  |  |  |
|
|
146
|
+
* | Dress |  |  |  |
|
|
147
|
+
* | Hat |  |  |  |
|
|
148
148
|
*
|
|
149
149
|
* @param request - AiTryOnRequest
|
|
150
150
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
@@ -159,12 +159,27 @@ class Client extends openapi_core_1.default {
|
|
|
159
159
|
if (!$dara.isNull(request.clothType)) {
|
|
160
160
|
query["ClothType"] = request.clothType;
|
|
161
161
|
}
|
|
162
|
+
if (!$dara.isNull(request.mode)) {
|
|
163
|
+
query["Mode"] = request.mode;
|
|
164
|
+
}
|
|
162
165
|
if (!$dara.isNull(request.modelImageUrl)) {
|
|
163
166
|
query["ModelImageUrl"] = request.modelImageUrl;
|
|
164
167
|
}
|
|
168
|
+
if (!$dara.isNull(request.modelTemplateUrl)) {
|
|
169
|
+
query["ModelTemplateUrl"] = request.modelTemplateUrl;
|
|
170
|
+
}
|
|
171
|
+
if (!$dara.isNull(request.poseTemplateUrl)) {
|
|
172
|
+
query["PoseTemplateUrl"] = request.poseTemplateUrl;
|
|
173
|
+
}
|
|
174
|
+
if (!$dara.isNull(request.ratio)) {
|
|
175
|
+
query["Ratio"] = request.ratio;
|
|
176
|
+
}
|
|
165
177
|
if (!$dara.isNull(request.resolution)) {
|
|
166
178
|
query["Resolution"] = request.resolution;
|
|
167
179
|
}
|
|
180
|
+
if (!$dara.isNull(request.tryonType)) {
|
|
181
|
+
query["TryonType"] = request.tryonType;
|
|
182
|
+
}
|
|
168
183
|
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
169
184
|
query: openapi_core_2.OpenApiUtil.query(query),
|
|
170
185
|
});
|
|
@@ -182,38 +197,38 @@ class Client extends openapi_core_1.default {
|
|
|
182
197
|
return $dara.cast(await this.callApi(params, req, runtime), new $_model.AiTryOnResponse({}));
|
|
183
198
|
}
|
|
184
199
|
/**
|
|
185
|
-
* Generates
|
|
200
|
+
* Generates virtual try-on images by applying specified garments to a model image based on AI algorithms. It preserves the model\\"s pose, facial features, and background details while ensuring a realistic fit. Users can obtain the processed images by providing the URLs of the original product and model images.
|
|
186
201
|
*
|
|
187
202
|
* @remarks
|
|
188
203
|
* ## Scenarios
|
|
189
204
|
* - **Virtual try-on for clothing:**
|
|
190
|
-
* Supports various clothing categories such as tops, bottoms, jumpsuits, and dresses. After
|
|
205
|
+
* Supports various clothing categories such as tops, bottoms, jumpsuits, and dresses. After users upload a model image and a product image, the system generates natural and realistic try-on effects to intuitively display how the clothing looks on the model.
|
|
191
206
|
* - **Virtual try-on for shoes and hats:**
|
|
192
|
-
* Supports virtual try-on for products such as shoes and hats.
|
|
207
|
+
* Supports virtual try-on for products such as shoes and hats. It intelligently matches the position and proportion of the product based on the model\\"s pose and body parts, presenting a coordinated and realistic wearing effect.
|
|
193
208
|
* - **E-commerce product display and marketing:**
|
|
194
209
|
* Helps merchants quickly generate model try-on images for different products, reducing the costs of traditional photography, outfit changes, and post-production, and improving the production efficiency of product images.
|
|
195
210
|
* - **Online shopping experience optimization:**
|
|
196
|
-
*
|
|
211
|
+
* Consumers can preview the wearing effect of products through virtual try-on, more intuitively understand the style, matching, and overall effect of the products, assist in purchase decisions, and enhance the shopping experience.
|
|
197
212
|
* ## Features
|
|
198
|
-
* - **First,
|
|
199
|
-
* - a. Model image:
|
|
200
|
-
* - b. Product image:
|
|
201
|
-
* - **Second,
|
|
202
|
-
* - a. Specify product type:
|
|
203
|
-
* - b. Automatic type recognition:
|
|
204
|
-
* - **Finally, the system
|
|
205
|
-
* - a. Preserve model details:
|
|
206
|
-
* - b. Maintain image consistency:
|
|
207
|
-
* - c. Generate try-on effect:
|
|
213
|
+
* - **First, users need to input a model image and a product image. The system uses the model image as the try-on subject and applies the garment from the product image to the model:**
|
|
214
|
+
* - a. Model image: the image of the person who needs to perform the virtual try-on.
|
|
215
|
+
* - b. Product image: the image of the clothing, shoes, or hat to be worn by the model.
|
|
216
|
+
* - **Second, users can select the corresponding product type based on the actual product. Supported types include tops, bottoms, jumpsuits, dresses, shoes, and hats:**
|
|
217
|
+
* - a. Specify product type: users can directly input the type of the current product, and the system will process it according to the specified type.
|
|
218
|
+
* - b. Automatic type recognition: if the user does not input the product type, the system will automatically recognize the product category in the product image and perform the virtual try-on based on the recognition result.
|
|
219
|
+
* - **Finally, the system combines the model image, product image, and product type to generate a virtual try-on image, displaying the wearing effect of the product on the model:**
|
|
220
|
+
* - a. Preserve model details: the generation process does not adjust the appearance, hairstyle, pose, body shape, and other details of the person in the original model image.
|
|
221
|
+
* - b. Maintain image consistency: the background, composition, lighting, and overall visual effect of the original model image remain unchanged, and only the wearing area corresponding to the product is processed.
|
|
222
|
+
* - c. Generate try-on effect: naturally apply the product to the model, making it fit the person\\"s pose and body structure, and generate a coordinated and realistic virtual try-on image.
|
|
208
223
|
* ## Examples
|
|
209
|
-
* | **Type** | **Model image** | **
|
|
224
|
+
* | **Type** | **Model image** | **Garment image** | **Try-on result image** |
|
|
210
225
|
* | --- | --- | --- | --- |
|
|
211
|
-
* |
|
|
212
|
-
* |
|
|
226
|
+
* | Top |  |  |  |
|
|
227
|
+
* | Bottom |  |  |  |
|
|
213
228
|
* | Shoes |  |  |  |
|
|
214
|
-
* |
|
|
215
|
-
* |
|
|
216
|
-
* |
|
|
229
|
+
* | Jumpsuit |  |  |  |
|
|
230
|
+
* | Dress |  |  |  |
|
|
231
|
+
* | Hat |  |  |  |
|
|
217
232
|
*
|
|
218
233
|
* @param request - AiTryOnRequest
|
|
219
234
|
* @returns AiTryOnResponse
|
|
@@ -845,22 +860,29 @@ class Client extends openapi_core_1.default {
|
|
|
845
860
|
return await this.diduiAreaDeductionProWithOptions(request, runtime);
|
|
846
861
|
}
|
|
847
862
|
/**
|
|
848
|
-
* Translates documents
|
|
863
|
+
* Translates documents with a solution designed specifically for document translation. It supports over 150 languages and provides pivot translation capabilities with thousands of pivot combinations. It handles multi-scenario, multi-page, and highly complex document translation, but does not currently support scanned documents. It excels in the following aspects:
|
|
864
|
+
* - Content accuracy: translation accuracy, and accuracy of parameters and units.
|
|
865
|
+
* - Structural integrity: overall layout continuity, and restoration of page margins and layouts.
|
|
849
866
|
*
|
|
850
867
|
* @remarks
|
|
851
|
-
*
|
|
852
|
-
* Designed specifically for document translation, this
|
|
868
|
+
* # Product introduction
|
|
869
|
+
* Designed specifically for document translation, this service supports more than 150 languages and provides bridging translation capabilities with thousands of language combinations. It handles multi-scenario, multi-page, and highly complex document translations, but does not currently support scanned documents.
|
|
853
870
|
* It excels in the following aspects:
|
|
854
|
-
*
|
|
855
|
-
*
|
|
856
|
-
*
|
|
857
|
-
*
|
|
858
|
-
*
|
|
859
|
-
*
|
|
860
|
-
*
|
|
861
|
-
*
|
|
862
|
-
*
|
|
863
|
-
*
|
|
871
|
+
* * Content accuracy: translation accuracy, and accuracy of parameters and units.
|
|
872
|
+
*
|
|
873
|
+
* * Structural integrity: overall layout continuity, and restoration of page margins and layouts.
|
|
874
|
+
* # Scenarios
|
|
875
|
+
* Cross-border e-commerce product manuals, contracts, agreements, business proposals, qualification documents, teaching materials, courseware, and various other scenarios.
|
|
876
|
+
* # Features
|
|
877
|
+
* * Supports PDF, Word, and Excel formats. Supports source documents that contain multiple languages. For the detailed language list, see Section 4.4.
|
|
878
|
+
*
|
|
879
|
+
* * Supports the translation of text within images in documents, as well as complex translation scenarios involving other charts and special symbols.
|
|
880
|
+
*
|
|
881
|
+
* * Supports highly accurate layout restoration after translation.
|
|
882
|
+
*
|
|
883
|
+
* * Supports the translation of a single PDF or Word document with up to **800 pages**.
|
|
884
|
+
*
|
|
885
|
+
* * Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and translation omission (ABC-null value). This is commonly used in scenarios such as brand word protection. You can implement this by passing the corresponding intervention glossary ID when calling the API to meet your translation needs in different scenarios. Generally, you can upload up to 100,000 intervention terms. If you need more, contact the platform for assistance. For detailed instructions on translation intervention, see [Full-modal translation - Translation intervention instruction manual](https://www.alibabacloud.com/help/en/aidge/full-modal-translation-translation-intervention-instruction-manual)
|
|
864
886
|
*
|
|
865
887
|
* @param request - DocumentTranslateRequest
|
|
866
888
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
@@ -898,22 +920,29 @@ class Client extends openapi_core_1.default {
|
|
|
898
920
|
return $dara.cast(await this.callApi(params, req, runtime), new $_model.DocumentTranslateResponse({}));
|
|
899
921
|
}
|
|
900
922
|
/**
|
|
901
|
-
* Translates documents
|
|
923
|
+
* Translates documents with a solution designed specifically for document translation. It supports over 150 languages and provides pivot translation capabilities with thousands of pivot combinations. It handles multi-scenario, multi-page, and highly complex document translation, but does not currently support scanned documents. It excels in the following aspects:
|
|
924
|
+
* - Content accuracy: translation accuracy, and accuracy of parameters and units.
|
|
925
|
+
* - Structural integrity: overall layout continuity, and restoration of page margins and layouts.
|
|
902
926
|
*
|
|
903
927
|
* @remarks
|
|
904
|
-
*
|
|
905
|
-
* Designed specifically for document translation, this
|
|
928
|
+
* # Product introduction
|
|
929
|
+
* Designed specifically for document translation, this service supports more than 150 languages and provides bridging translation capabilities with thousands of language combinations. It handles multi-scenario, multi-page, and highly complex document translations, but does not currently support scanned documents.
|
|
906
930
|
* It excels in the following aspects:
|
|
907
|
-
*
|
|
908
|
-
*
|
|
909
|
-
*
|
|
910
|
-
*
|
|
911
|
-
*
|
|
912
|
-
*
|
|
913
|
-
*
|
|
914
|
-
*
|
|
915
|
-
*
|
|
916
|
-
*
|
|
931
|
+
* * Content accuracy: translation accuracy, and accuracy of parameters and units.
|
|
932
|
+
*
|
|
933
|
+
* * Structural integrity: overall layout continuity, and restoration of page margins and layouts.
|
|
934
|
+
* # Scenarios
|
|
935
|
+
* Cross-border e-commerce product manuals, contracts, agreements, business proposals, qualification documents, teaching materials, courseware, and various other scenarios.
|
|
936
|
+
* # Features
|
|
937
|
+
* * Supports PDF, Word, and Excel formats. Supports source documents that contain multiple languages. For the detailed language list, see Section 4.4.
|
|
938
|
+
*
|
|
939
|
+
* * Supports the translation of text within images in documents, as well as complex translation scenarios involving other charts and special symbols.
|
|
940
|
+
*
|
|
941
|
+
* * Supports highly accurate layout restoration after translation.
|
|
942
|
+
*
|
|
943
|
+
* * Supports the translation of a single PDF or Word document with up to **800 pages**.
|
|
944
|
+
*
|
|
945
|
+
* * Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and translation omission (ABC-null value). This is commonly used in scenarios such as brand word protection. You can implement this by passing the corresponding intervention glossary ID when calling the API to meet your translation needs in different scenarios. Generally, you can upload up to 100,000 intervention terms. If you need more, contact the platform for assistance. For detailed instructions on translation intervention, see [Full-modal translation - Translation intervention instruction manual](https://www.alibabacloud.com/help/en/aidge/full-modal-translation-translation-intervention-instruction-manual)
|
|
917
946
|
*
|
|
918
947
|
* @param request - DocumentTranslateRequest
|
|
919
948
|
* @returns DocumentTranslateResponse
|
|
@@ -4157,6 +4186,95 @@ class Client extends openapi_core_1.default {
|
|
|
4157
4186
|
let runtime = new $dara.RuntimeOptions({});
|
|
4158
4187
|
return await this.productHotspotDetectionWithOptions(request, runtime);
|
|
4159
4188
|
}
|
|
4189
|
+
/**
|
|
4190
|
+
* Generates a single-product showcase video for e-commerce merchants and platforms based on a product title and multiple images of the same product. This API optionally accepts a storyboard script, automatically selects reference images, plans a three-shot storyboard, and generates the video. It uses asynchronous tasks, supports 720P and 1080P resolutions and four aspect ratios, and applies to product content production for non-apparel categories. For apparel categories, use the e-commerce enhanced edition.
|
|
4191
|
+
*
|
|
4192
|
+
* @remarks
|
|
4193
|
+
* # Product introduction
|
|
4194
|
+
* The basic e-commerce video edition is designed for e-commerce merchants and platforms. It generates a single-product showcase video based on a product title and multiple images of the same product. You can optionally provide a storyboard script. The system automatically selects reference images, plans a three-shot storyboard, and generates the video. This API uses asynchronous tasks, supports 720P and 1080P resolutions and four aspect ratios, and applies to product content production for non-apparel categories. For apparel categories, use the e-commerce enhanced edition.
|
|
4195
|
+
* # Scenarios
|
|
4196
|
+
* - New product material generation: Provide a product title and images to automatically plan storyboard content such as product debut, details, or usage demonstrations.
|
|
4197
|
+
* - Video production with existing scripts: Provide a storyboard script or creative description. The system optimizes the storyboard script based on the product images and retains shot intentions that are supported by the images.
|
|
4198
|
+
* - Adaptation to different video placements: Use the aspect ratio parameter to adapt to vertical short videos, main product images, detail pages, and horizontal displays. For batch production, each request corresponds to one product and one video.
|
|
4199
|
+
* # Features
|
|
4200
|
+
* - Automatic image selection and storyboard planning: When no script is provided, the system generates a storyboard based on the product title and images. When a script is provided, the system still performs image selection and planning, eliminating the need for callers to organize video prompts.
|
|
4201
|
+
* - Product appearance consistency constraint: The system uses the selected complete product image as the appearance baseline. It checks the color scheme, structure, proportion, texture, version, and specifications of other images, and selects only reference images that can be confirmed to belong to the same SKU.
|
|
4202
|
+
* - Flexible video specifications: Without a script, the duration is 5 to 15 seconds. With a script, the duration is 5 to 30 seconds. The system supports four aspect ratios (16:9, 1:1, 3:4, and 9:16) and two resolutions (720P and 1080P).
|
|
4203
|
+
* - Asynchronous generation and task query: After a task is created, a task ID is returned. Callers use the query API to obtain the result. The final video includes background music, no voiceover, and no additional subtitles or marketing text.
|
|
4204
|
+
* # Examples
|
|
4205
|
+
* [View the attachment Digital_040_WiFi6_Gigabit_Router.mp4 in the DingTalk document.](https://alidocs.dingtalk.com/i/nodes/gwva2dxOW4vRkd9DUn1g1p6kJbkz3BRL?cid=6760411388:7016395022&corpId=dingd8e1123006514592&iframeQuery=anchorId%3DX02mvsyycduj3nepwoeush&utm_medium=im_card&utm_scene=person_space&utm_source=im)
|
|
4206
|
+
*
|
|
4207
|
+
* @param tmpReq - ProductVideoGenerationRequest
|
|
4208
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
4209
|
+
* @returns ProductVideoGenerationResponse
|
|
4210
|
+
*/
|
|
4211
|
+
async productVideoGenerationWithOptions(tmpReq, runtime) {
|
|
4212
|
+
tmpReq.validate();
|
|
4213
|
+
let request = new $_model.ProductVideoGenerationShrinkRequest({});
|
|
4214
|
+
openapi_core_2.OpenApiUtil.convert(tmpReq, request);
|
|
4215
|
+
if (!$dara.isNull(tmpReq.productImages)) {
|
|
4216
|
+
request.productImagesShrink = openapi_core_2.OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.productImages, "product_images", "json");
|
|
4217
|
+
}
|
|
4218
|
+
let query = {};
|
|
4219
|
+
if (!$dara.isNull(request.aspectRatio)) {
|
|
4220
|
+
query["aspect_ratio"] = request.aspectRatio;
|
|
4221
|
+
}
|
|
4222
|
+
if (!$dara.isNull(request.duration)) {
|
|
4223
|
+
query["duration"] = request.duration;
|
|
4224
|
+
}
|
|
4225
|
+
if (!$dara.isNull(request.productImagesShrink)) {
|
|
4226
|
+
query["product_images"] = request.productImagesShrink;
|
|
4227
|
+
}
|
|
4228
|
+
if (!$dara.isNull(request.productTitle)) {
|
|
4229
|
+
query["product_title"] = request.productTitle;
|
|
4230
|
+
}
|
|
4231
|
+
if (!$dara.isNull(request.resolution)) {
|
|
4232
|
+
query["resolution"] = request.resolution;
|
|
4233
|
+
}
|
|
4234
|
+
if (!$dara.isNull(request.script)) {
|
|
4235
|
+
query["script"] = request.script;
|
|
4236
|
+
}
|
|
4237
|
+
let req = new openapi_core_2.$OpenApiUtil.OpenApiRequest({
|
|
4238
|
+
query: openapi_core_2.OpenApiUtil.query(query),
|
|
4239
|
+
});
|
|
4240
|
+
let params = new openapi_core_2.$OpenApiUtil.Params({
|
|
4241
|
+
action: "ProductVideoGeneration",
|
|
4242
|
+
version: "2026-04-28",
|
|
4243
|
+
protocol: "HTTPS",
|
|
4244
|
+
pathname: "/",
|
|
4245
|
+
method: "POST",
|
|
4246
|
+
authType: "AK",
|
|
4247
|
+
style: "RPC",
|
|
4248
|
+
reqBodyType: "formData",
|
|
4249
|
+
bodyType: "json",
|
|
4250
|
+
});
|
|
4251
|
+
return $dara.cast(await this.callApi(params, req, runtime), new $_model.ProductVideoGenerationResponse({}));
|
|
4252
|
+
}
|
|
4253
|
+
/**
|
|
4254
|
+
* Generates a single-product showcase video for e-commerce merchants and platforms based on a product title and multiple images of the same product. This API optionally accepts a storyboard script, automatically selects reference images, plans a three-shot storyboard, and generates the video. It uses asynchronous tasks, supports 720P and 1080P resolutions and four aspect ratios, and applies to product content production for non-apparel categories. For apparel categories, use the e-commerce enhanced edition.
|
|
4255
|
+
*
|
|
4256
|
+
* @remarks
|
|
4257
|
+
* # Product introduction
|
|
4258
|
+
* The basic e-commerce video edition is designed for e-commerce merchants and platforms. It generates a single-product showcase video based on a product title and multiple images of the same product. You can optionally provide a storyboard script. The system automatically selects reference images, plans a three-shot storyboard, and generates the video. This API uses asynchronous tasks, supports 720P and 1080P resolutions and four aspect ratios, and applies to product content production for non-apparel categories. For apparel categories, use the e-commerce enhanced edition.
|
|
4259
|
+
* # Scenarios
|
|
4260
|
+
* - New product material generation: Provide a product title and images to automatically plan storyboard content such as product debut, details, or usage demonstrations.
|
|
4261
|
+
* - Video production with existing scripts: Provide a storyboard script or creative description. The system optimizes the storyboard script based on the product images and retains shot intentions that are supported by the images.
|
|
4262
|
+
* - Adaptation to different video placements: Use the aspect ratio parameter to adapt to vertical short videos, main product images, detail pages, and horizontal displays. For batch production, each request corresponds to one product and one video.
|
|
4263
|
+
* # Features
|
|
4264
|
+
* - Automatic image selection and storyboard planning: When no script is provided, the system generates a storyboard based on the product title and images. When a script is provided, the system still performs image selection and planning, eliminating the need for callers to organize video prompts.
|
|
4265
|
+
* - Product appearance consistency constraint: The system uses the selected complete product image as the appearance baseline. It checks the color scheme, structure, proportion, texture, version, and specifications of other images, and selects only reference images that can be confirmed to belong to the same SKU.
|
|
4266
|
+
* - Flexible video specifications: Without a script, the duration is 5 to 15 seconds. With a script, the duration is 5 to 30 seconds. The system supports four aspect ratios (16:9, 1:1, 3:4, and 9:16) and two resolutions (720P and 1080P).
|
|
4267
|
+
* - Asynchronous generation and task query: After a task is created, a task ID is returned. Callers use the query API to obtain the result. The final video includes background music, no voiceover, and no additional subtitles or marketing text.
|
|
4268
|
+
* # Examples
|
|
4269
|
+
* [View the attachment Digital_040_WiFi6_Gigabit_Router.mp4 in the DingTalk document.](https://alidocs.dingtalk.com/i/nodes/gwva2dxOW4vRkd9DUn1g1p6kJbkz3BRL?cid=6760411388:7016395022&corpId=dingd8e1123006514592&iframeQuery=anchorId%3DX02mvsyycduj3nepwoeush&utm_medium=im_card&utm_scene=person_space&utm_source=im)
|
|
4270
|
+
*
|
|
4271
|
+
* @param request - ProductVideoGenerationRequest
|
|
4272
|
+
* @returns ProductVideoGenerationResponse
|
|
4273
|
+
*/
|
|
4274
|
+
async productVideoGeneration(request) {
|
|
4275
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
4276
|
+
return await this.productVideoGenerationWithOptions(request, runtime);
|
|
4277
|
+
}
|
|
4160
4278
|
/**
|
|
4161
4279
|
* Queries the result of an asynchronous task. The API name in the POP gateway is QueryAsyncTaskResult.
|
|
4162
4280
|
*
|
|
@@ -5596,26 +5714,26 @@ class Client extends openapi_core_1.default {
|
|
|
5596
5714
|
return await this.videoTranslationWithOptions(request, runtime);
|
|
5597
5715
|
}
|
|
5598
5716
|
/**
|
|
5599
|
-
* Generates virtual try-on images by
|
|
5717
|
+
* Generates virtual try-on images by applying a specified garment to a model image based on AI algorithms. It preserves the model\\"s pose, facial features, and background details while ensuring a realistic fit. Users only need to provide the URLs of the original model and garment images to obtain the processed image.
|
|
5600
5718
|
*
|
|
5601
5719
|
* @remarks
|
|
5602
5720
|
* ## Scenarios
|
|
5603
5721
|
* - **Virtual try-on for clothing:**
|
|
5604
|
-
* Supports various clothing categories such as tops, bottoms, jumpsuits, and dresses. After
|
|
5722
|
+
* Supports various clothing categories such as tops, bottoms, jumpsuits, and dresses. After users upload a model image and a garment image, the system generates natural and realistic try-on effects to intuitively display how the garment looks on the model.
|
|
5605
5723
|
* - **Virtual try-on for shoes and hats:**
|
|
5606
|
-
* Supports virtual try-on for accessories such as shoes and hats. The system intelligently matches the position and proportion of the
|
|
5724
|
+
* Supports virtual try-on for accessories such as shoes and hats. The system intelligently matches the position and proportion of the product based on the model\\"s pose and body parts, presenting a coordinated and realistic wearing effect.
|
|
5607
5725
|
* - **E-commerce product display and marketing:**
|
|
5608
|
-
*
|
|
5726
|
+
* Helps merchants quickly generate model try-on images for different products, reducing the costs of traditional photography, outfit changes, and post-production, and improving the production efficiency of product images.
|
|
5609
5727
|
* - **Online shopping experience optimization:**
|
|
5610
|
-
* Allows consumers to preview the wearing effect of products through virtual try-on, providing a more intuitive understanding of the style, matching, and overall effect of the
|
|
5728
|
+
* Allows consumers to preview the wearing effect of products through virtual try-on, providing a more intuitive understanding of the style, matching, and overall effect of the product, which assists in purchase decisions and enhances the shopping experience.
|
|
5611
5729
|
* ## Features
|
|
5612
|
-
* - **First,
|
|
5613
|
-
* - a. Model image: the image of the person
|
|
5614
|
-
* - b.
|
|
5615
|
-
* - **Second,
|
|
5616
|
-
* - a. Specify product type:
|
|
5617
|
-
* - b. Automatic type recognition: if
|
|
5618
|
-
* - **Finally, the system combines the model image,
|
|
5730
|
+
* - **First, users need to input a model image and a garment image. The system uses the model image as the try-on subject and applies the garment from the garment image to the model:**
|
|
5731
|
+
* - a. Model image: the image of the person for the virtual try-on.
|
|
5732
|
+
* - b. Garment image: the image of the clothing, shoes, or hat to be worn by the model.
|
|
5733
|
+
* - **Second, users can select the corresponding product type based on the actual product. Supported types include tops, bottoms, jumpsuits, dresses, shoes, and hats:**
|
|
5734
|
+
* - a. Specify product type: users can directly input the type of the current product, and the system will process it according to the specified type.
|
|
5735
|
+
* - b. Automatic type recognition: if the user does not input the product type, the system will automatically recognize the product category in the garment image and perform the virtual try-on based on the recognition result.
|
|
5736
|
+
* - **Finally, the system combines the model image, garment image, and product type to generate a virtual try-on image, displaying the wearing effect of the product on the model:**
|
|
5619
5737
|
* - a. Preserve model details: the generation process does not adjust the appearance, hairstyle, pose, body shape, or other details of the person in the original model image.
|
|
5620
5738
|
* - b. Maintain image consistency: the background, composition, lighting, and overall visual effect of the original model image remain unchanged. Only the wearing area corresponding to the product is processed.
|
|
5621
5739
|
* - c. Generate try-on effect: the product is naturally applied to the model, fitting the person\\"s pose and body structure to generate a coordinated and realistic virtual try-on image.
|
|
@@ -5623,8 +5741,8 @@ class Client extends openapi_core_1.default {
|
|
|
5623
5741
|
* | **Type** | **Model image** | **Garment image** | **Try-on result** |
|
|
5624
5742
|
* | --- | --- | --- | --- |
|
|
5625
5743
|
* | Tops |  |  |  |
|
|
5626
|
-
* | Bottoms |  |  |  |  |  |
|
|
5745
|
+
* | Shoes |  |  |  |
|
|
5628
5746
|
* | Jumpsuits |  |  |  |
|
|
5629
5747
|
* | Dresses |  |  |  |
|
|
5630
5748
|
* | Hats |  |  |  |
|
|
@@ -5665,26 +5783,26 @@ class Client extends openapi_core_1.default {
|
|
|
5665
5783
|
return $dara.cast(await this.callApi(params, req, runtime), new $_model.VirtualTryOnResponse({}));
|
|
5666
5784
|
}
|
|
5667
5785
|
/**
|
|
5668
|
-
* Generates virtual try-on images by
|
|
5786
|
+
* Generates virtual try-on images by applying a specified garment to a model image based on AI algorithms. It preserves the model\\"s pose, facial features, and background details while ensuring a realistic fit. Users only need to provide the URLs of the original model and garment images to obtain the processed image.
|
|
5669
5787
|
*
|
|
5670
5788
|
* @remarks
|
|
5671
5789
|
* ## Scenarios
|
|
5672
5790
|
* - **Virtual try-on for clothing:**
|
|
5673
|
-
* Supports various clothing categories such as tops, bottoms, jumpsuits, and dresses. After
|
|
5791
|
+
* Supports various clothing categories such as tops, bottoms, jumpsuits, and dresses. After users upload a model image and a garment image, the system generates natural and realistic try-on effects to intuitively display how the garment looks on the model.
|
|
5674
5792
|
* - **Virtual try-on for shoes and hats:**
|
|
5675
|
-
* Supports virtual try-on for accessories such as shoes and hats. The system intelligently matches the position and proportion of the
|
|
5793
|
+
* Supports virtual try-on for accessories such as shoes and hats. The system intelligently matches the position and proportion of the product based on the model\\"s pose and body parts, presenting a coordinated and realistic wearing effect.
|
|
5676
5794
|
* - **E-commerce product display and marketing:**
|
|
5677
|
-
*
|
|
5795
|
+
* Helps merchants quickly generate model try-on images for different products, reducing the costs of traditional photography, outfit changes, and post-production, and improving the production efficiency of product images.
|
|
5678
5796
|
* - **Online shopping experience optimization:**
|
|
5679
|
-
* Allows consumers to preview the wearing effect of products through virtual try-on, providing a more intuitive understanding of the style, matching, and overall effect of the
|
|
5797
|
+
* Allows consumers to preview the wearing effect of products through virtual try-on, providing a more intuitive understanding of the style, matching, and overall effect of the product, which assists in purchase decisions and enhances the shopping experience.
|
|
5680
5798
|
* ## Features
|
|
5681
|
-
* - **First,
|
|
5682
|
-
* - a. Model image: the image of the person
|
|
5683
|
-
* - b.
|
|
5684
|
-
* - **Second,
|
|
5685
|
-
* - a. Specify product type:
|
|
5686
|
-
* - b. Automatic type recognition: if
|
|
5687
|
-
* - **Finally, the system combines the model image,
|
|
5799
|
+
* - **First, users need to input a model image and a garment image. The system uses the model image as the try-on subject and applies the garment from the garment image to the model:**
|
|
5800
|
+
* - a. Model image: the image of the person for the virtual try-on.
|
|
5801
|
+
* - b. Garment image: the image of the clothing, shoes, or hat to be worn by the model.
|
|
5802
|
+
* - **Second, users can select the corresponding product type based on the actual product. Supported types include tops, bottoms, jumpsuits, dresses, shoes, and hats:**
|
|
5803
|
+
* - a. Specify product type: users can directly input the type of the current product, and the system will process it according to the specified type.
|
|
5804
|
+
* - b. Automatic type recognition: if the user does not input the product type, the system will automatically recognize the product category in the garment image and perform the virtual try-on based on the recognition result.
|
|
5805
|
+
* - **Finally, the system combines the model image, garment image, and product type to generate a virtual try-on image, displaying the wearing effect of the product on the model:**
|
|
5688
5806
|
* - a. Preserve model details: the generation process does not adjust the appearance, hairstyle, pose, body shape, or other details of the person in the original model image.
|
|
5689
5807
|
* - b. Maintain image consistency: the background, composition, lighting, and overall visual effect of the original model image remain unchanged. Only the wearing area corresponding to the product is processed.
|
|
5690
5808
|
* - c. Generate try-on effect: the product is naturally applied to the model, fitting the person\\"s pose and body structure to generate a coordinated and realistic virtual try-on image.
|
|
@@ -5692,8 +5810,8 @@ class Client extends openapi_core_1.default {
|
|
|
5692
5810
|
* | **Type** | **Model image** | **Garment image** | **Try-on result** |
|
|
5693
5811
|
* | --- | --- | --- | --- |
|
|
5694
5812
|
* | Tops |  |  |  |
|
|
5695
|
-
* | Bottoms |  |  |  |  |  |
|
|
5814
|
+
* | Shoes |  |  |  |
|
|
5697
5815
|
* | Jumpsuits |  |  |  |
|
|
5698
5816
|
* | Dresses |  |  |  |
|
|
5699
5817
|
* | Hats |  |  |  |
|