@alicloud/aidge20260428 4.0.0 → 5.1.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.
Files changed (54) hide show
  1. package/dist/client.d.ts +165 -49
  2. package/dist/client.js +248 -49
  3. package/dist/client.js.map +1 -1
  4. package/dist/models/DocumentTranslateRequest.d.ts +2 -2
  5. package/dist/models/DocumentTranslateResponseBody.d.ts +1 -1
  6. package/dist/models/ImageTranslationPlusRequest.d.ts +75 -0
  7. package/dist/models/ImageTranslationPlusRequest.js +70 -0
  8. package/dist/models/ImageTranslationPlusRequest.js.map +1 -0
  9. package/dist/models/ImageTranslationPlusResponse.d.ts +19 -0
  10. package/dist/models/ImageTranslationPlusResponse.js +69 -0
  11. package/dist/models/ImageTranslationPlusResponse.js.map +1 -0
  12. package/dist/models/ImageTranslationPlusResponseBody.d.ts +72 -0
  13. package/dist/models/ImageTranslationPlusResponseBody.js +88 -0
  14. package/dist/models/ImageTranslationPlusResponseBody.js.map +1 -0
  15. package/dist/models/QueryAsyncTaskResultResponseBody.d.ts +1 -1
  16. package/dist/models/QueryAsyncTaskResultResponseBody.js +1 -1
  17. package/dist/models/QueryAsyncTaskResultResponseBody.js.map +1 -1
  18. package/dist/models/VideoGenerationRequest.d.ts +107 -0
  19. package/dist/models/VideoGenerationRequest.js +144 -0
  20. package/dist/models/VideoGenerationRequest.js.map +1 -0
  21. package/dist/models/VideoGenerationResponse.d.ts +19 -0
  22. package/dist/models/VideoGenerationResponse.js +69 -0
  23. package/dist/models/VideoGenerationResponse.js.map +1 -0
  24. package/dist/models/VideoGenerationResponseBody.d.ts +54 -0
  25. package/dist/models/VideoGenerationResponseBody.js +93 -0
  26. package/dist/models/VideoGenerationResponseBody.js.map +1 -0
  27. package/dist/models/VideoGenerationShrinkRequest.d.ts +24 -0
  28. package/dist/models/VideoGenerationShrinkRequest.js +62 -0
  29. package/dist/models/VideoGenerationShrinkRequest.js.map +1 -0
  30. package/dist/models/VideoTranslationRequest.d.ts +9 -0
  31. package/dist/models/VideoTranslationRequest.js.map +1 -1
  32. package/dist/models/VideoTranslationResponseBody.d.ts +19 -0
  33. package/dist/models/VideoTranslationResponseBody.js.map +1 -1
  34. package/dist/models/VideoTranslationShrinkRequest.d.ts +9 -0
  35. package/dist/models/VideoTranslationShrinkRequest.js.map +1 -1
  36. package/dist/models/model.d.ts +12 -0
  37. package/dist/models/model.js +27 -3
  38. package/dist/models/model.js.map +1 -1
  39. package/package.json +1 -1
  40. package/src/client.ts +266 -50
  41. package/src/models/DocumentTranslateRequest.ts +2 -2
  42. package/src/models/DocumentTranslateResponseBody.ts +1 -1
  43. package/src/models/ImageTranslationPlusRequest.ts +100 -0
  44. package/src/models/ImageTranslationPlusResponse.ts +40 -0
  45. package/src/models/ImageTranslationPlusResponseBody.ts +106 -0
  46. package/src/models/QueryAsyncTaskResultResponseBody.ts +2 -2
  47. package/src/models/VideoGenerationRequest.ts +177 -0
  48. package/src/models/VideoGenerationResponse.ts +40 -0
  49. package/src/models/VideoGenerationResponseBody.ts +91 -0
  50. package/src/models/VideoGenerationShrinkRequest.ts +41 -0
  51. package/src/models/VideoTranslationRequest.ts +9 -0
  52. package/src/models/VideoTranslationResponseBody.ts +19 -0
  53. package/src/models/VideoTranslationShrinkRequest.ts +9 -0
  54. package/src/models/model.ts +12 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alicloud/aidge20260428",
3
- "version": "4.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "",
5
5
  "main": "dist/client.js",
6
6
  "scripts": {
package/src/client.ts CHANGED
@@ -515,9 +515,7 @@ export default class Client extends OpenApi {
515
515
  }
516
516
 
517
517
  /**
518
- * Translates documents between more than 100 language pairs (including bridged pairs), supporting multi-scenario, multi-page, and highly complex document translation. Scanned documents are not currently supported. Excels in the following areas:
519
- * - Content accuracy: translation accuracy, parameter and unit accuracy
520
- * - Structural integrity: overall layout continuity, page margin and layout preservation
518
+ * Translates documents between more than 100 language pairs (including bridged pairs), supporting multi-scenario, multi-page, and highly complex document translation. Scanned documents are not currently supported. Excels in the following areas: - Content accuracy: translation accuracy, parameter and unit accuracy - Structural integrity: overall layout continuity, page margin and layout preservation.
521
519
  *
522
520
  * @remarks
523
521
  * ## Product Introduction
@@ -526,13 +524,13 @@ export default class Client extends OpenApi {
526
524
  * - Content accuracy: translation accuracy, parameter and unit accuracy
527
525
  * - Structural integrity: overall layout continuity, page margin and layout preservation
528
526
  * ## Common scenarios
529
- * Cross-border e-commerce product manuals, contracts, agreements, business proposals, qualification documents, textbooks, courseware, and other scenarios.
530
- * 3. Features
531
- * - Supports PDF and Word formats. Supports source documents containing multiple languages. Refer to section 4.5 for the detailed language list.
527
+ * Cross-border e-commerce product manuals, contracts, agreements, business proposals, qualification documents, textbooks and courseware, and other scenarios.
528
+ * ## Features
529
+ * - Supports PDF and Word formats. Supports source documents containing multiple languages. For a detailed language list, see section 4.5.
532
530
  * - Supports translation of text within images in documents, as well as other complex translation scenarios such as charts and special symbols.
533
531
  * - Supports high-fidelity layout preservation after translation.
534
- * - A single PDF supports up to 100 pages. A single Word document supports up to 100 pages.
535
- * - Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and skip translation (ABC-empty value). Commonly used for brand name protection scenarios. Simply pass the corresponding glossary ID when calling the API to meet your translation needs across different scenarios. You can upload up to 100,000 glossary entries. Contact the platform for additional capacity.
532
+ * - A single PDF supports up to 100 pages, and a single Word document supports up to 100 pages.
533
+ * - Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and skip translation (ABC-empty value). Commonly used for brand name protection scenarios. Simply pass the corresponding intervention glossary ID when calling the API to meet your translation needs across different scenarios. You can upload up to 100,000 intervention terms. Contact the platform if you need more.
536
534
  *
537
535
  * @param request - DocumentTranslateRequest
538
536
  * @param runtime - runtime options for this request RuntimeOptions
@@ -575,9 +573,7 @@ export default class Client extends OpenApi {
575
573
  }
576
574
 
577
575
  /**
578
- * Translates documents between more than 100 language pairs (including bridged pairs), supporting multi-scenario, multi-page, and highly complex document translation. Scanned documents are not currently supported. Excels in the following areas:
579
- * - Content accuracy: translation accuracy, parameter and unit accuracy
580
- * - Structural integrity: overall layout continuity, page margin and layout preservation
576
+ * Translates documents between more than 100 language pairs (including bridged pairs), supporting multi-scenario, multi-page, and highly complex document translation. Scanned documents are not currently supported. Excels in the following areas: - Content accuracy: translation accuracy, parameter and unit accuracy - Structural integrity: overall layout continuity, page margin and layout preservation.
581
577
  *
582
578
  * @remarks
583
579
  * ## Product Introduction
@@ -586,13 +582,13 @@ export default class Client extends OpenApi {
586
582
  * - Content accuracy: translation accuracy, parameter and unit accuracy
587
583
  * - Structural integrity: overall layout continuity, page margin and layout preservation
588
584
  * ## Common scenarios
589
- * Cross-border e-commerce product manuals, contracts, agreements, business proposals, qualification documents, textbooks, courseware, and other scenarios.
590
- * 3. Features
591
- * - Supports PDF and Word formats. Supports source documents containing multiple languages. Refer to section 4.5 for the detailed language list.
585
+ * Cross-border e-commerce product manuals, contracts, agreements, business proposals, qualification documents, textbooks and courseware, and other scenarios.
586
+ * ## Features
587
+ * - Supports PDF and Word formats. Supports source documents containing multiple languages. For a detailed language list, see section 4.5.
592
588
  * - Supports translation of text within images in documents, as well as other complex translation scenarios such as charts and special symbols.
593
589
  * - Supports high-fidelity layout preservation after translation.
594
- * - A single PDF supports up to 100 pages. A single Word document supports up to 100 pages.
595
- * - Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and skip translation (ABC-empty value). Commonly used for brand name protection scenarios. Simply pass the corresponding glossary ID when calling the API to meet your translation needs across different scenarios. You can upload up to 100,000 glossary entries. Contact the platform for additional capacity.
590
+ * - A single PDF supports up to 100 pages, and a single Word document supports up to 100 pages.
591
+ * - Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and skip translation (ABC-empty value). Commonly used for brand name protection scenarios. Simply pass the corresponding intervention glossary ID when calling the API to meet your translation needs across different scenarios. You can upload up to 100,000 intervention terms. Contact the platform if you need more.
596
592
  *
597
593
  * @param request - DocumentTranslateRequest
598
594
  * @returns DocumentTranslateResponse
@@ -1322,6 +1318,128 @@ export default class Client extends OpenApi {
1322
1318
  return await this.imageRemoveWithOptions(request, runtime);
1323
1319
  }
1324
1320
 
1321
+ /**
1322
+ * Image Translation Plus is designed specifically for e-commerce images. It uses a Mixture of Experts (MOE) architecture and outperforms Image Translation Lite and Pro in translation accuracy for multiple minor languages. We recommend using it for the following 8 language pairs, with more to be supported in the future.
1323
+ *
1324
+ * @remarks
1325
+ * ## Product Introduction
1326
+ * Image Translation Plus is designed specifically for e-commerce images. It uses a Mixture of Experts (MOE) architecture and outperforms Image Translation Lite and Pro in translation accuracy for multiple minor languages. We recommend using it for the following language pairs, with more to be supported in the future.
1327
+ * Supported language pairs:
1328
+ * | **No.** | **Source Language** | | **Target Language** | |
1329
+ * | --- | --- | --- | --- | --- |
1330
+ * | | Language Code | Language Name | Language Code | Language Name |
1331
+ * | 1 | en | English | ar | Arabic |
1332
+ * | 2 | en | English | id | Indonesian |
1333
+ * | 3 | en | English | th | Thai |
1334
+ * | 4 | en | English | ko | Korean |
1335
+ * | 5 | en | English | ja | Japanese |
1336
+ * | 6 | en | English | vi | Vietnamese |
1337
+ * | 7 | en | English | ru | Russian |
1338
+ * | 8 | en | English | tl | Filipino |
1339
+ * | 9 | en | English | es | Spanish |
1340
+ * | 10 | en | English | fr | French |
1341
+ * | 11 | en | English | de | German |
1342
+ * | 12 | en | English | pl | Polish |.
1343
+ * ## Common scenarios
1344
+ * Main product images and detail images for cross-border e-commerce.
1345
+ * ## Functions and features
1346
+ * * **Product body information protection**: Supports custom selection of whether to translate text on the product body. This helps protect body information such as embedded product names from being translated.
1347
+ *
1348
+ * * **Brand name protection**: Supports custom selection of whether to translate brand names on images. This helps protect brand name information from being translated.
1349
+ *
1350
+ * * **Translation intervention**: Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and no translation (ABC-empty value). This is commonly used for brand name protection scenarios. Simply pass the corresponding intervention glossary ID when calling the API to meet your translation needs in different scenarios. You can upload up to 100,000 intervention terms. If you need more, contact the platform for assistance.
1351
+ *
1352
+ * @param request - ImageTranslationPlusRequest
1353
+ * @param runtime - runtime options for this request RuntimeOptions
1354
+ * @returns ImageTranslationPlusResponse
1355
+ */
1356
+ async imageTranslationPlusWithOptions(request: $_model.ImageTranslationPlusRequest, runtime: $dara.RuntimeOptions): Promise<$_model.ImageTranslationPlusResponse> {
1357
+ request.validate();
1358
+ let body : {[key: string ]: any} = { };
1359
+ if (!$dara.isNull(request.glossary)) {
1360
+ body["Glossary"] = request.glossary;
1361
+ }
1362
+
1363
+ if (!$dara.isNull(request.imageUrl)) {
1364
+ body["ImageUrl"] = request.imageUrl;
1365
+ }
1366
+
1367
+ if (!$dara.isNull(request.includingProductArea)) {
1368
+ body["IncludingProductArea"] = request.includingProductArea;
1369
+ }
1370
+
1371
+ if (!$dara.isNull(request.sourceLanguage)) {
1372
+ body["SourceLanguage"] = request.sourceLanguage;
1373
+ }
1374
+
1375
+ if (!$dara.isNull(request.targetLanguage)) {
1376
+ body["TargetLanguage"] = request.targetLanguage;
1377
+ }
1378
+
1379
+ if (!$dara.isNull(request.translatingBrandInTheProduct)) {
1380
+ body["TranslatingBrandInTheProduct"] = request.translatingBrandInTheProduct;
1381
+ }
1382
+
1383
+ if (!$dara.isNull(request.useImageEditor)) {
1384
+ body["UseImageEditor"] = request.useImageEditor;
1385
+ }
1386
+
1387
+ let req = new $OpenApiUtil.OpenApiRequest({
1388
+ body: OpenApiUtil.parseToMap(body),
1389
+ });
1390
+ let params = new $OpenApiUtil.Params({
1391
+ action: "ImageTranslationPlus",
1392
+ version: "2026-04-28",
1393
+ protocol: "HTTPS",
1394
+ pathname: "/",
1395
+ method: "POST",
1396
+ authType: "AK",
1397
+ style: "RPC",
1398
+ reqBodyType: "formData",
1399
+ bodyType: "json",
1400
+ });
1401
+ return $dara.cast<$_model.ImageTranslationPlusResponse>(await this.callApi(params, req, runtime), new $_model.ImageTranslationPlusResponse({}));
1402
+ }
1403
+
1404
+ /**
1405
+ * Image Translation Plus is designed specifically for e-commerce images. It uses a Mixture of Experts (MOE) architecture and outperforms Image Translation Lite and Pro in translation accuracy for multiple minor languages. We recommend using it for the following 8 language pairs, with more to be supported in the future.
1406
+ *
1407
+ * @remarks
1408
+ * ## Product Introduction
1409
+ * Image Translation Plus is designed specifically for e-commerce images. It uses a Mixture of Experts (MOE) architecture and outperforms Image Translation Lite and Pro in translation accuracy for multiple minor languages. We recommend using it for the following language pairs, with more to be supported in the future.
1410
+ * Supported language pairs:
1411
+ * | **No.** | **Source Language** | | **Target Language** | |
1412
+ * | --- | --- | --- | --- | --- |
1413
+ * | | Language Code | Language Name | Language Code | Language Name |
1414
+ * | 1 | en | English | ar | Arabic |
1415
+ * | 2 | en | English | id | Indonesian |
1416
+ * | 3 | en | English | th | Thai |
1417
+ * | 4 | en | English | ko | Korean |
1418
+ * | 5 | en | English | ja | Japanese |
1419
+ * | 6 | en | English | vi | Vietnamese |
1420
+ * | 7 | en | English | ru | Russian |
1421
+ * | 8 | en | English | tl | Filipino |
1422
+ * | 9 | en | English | es | Spanish |
1423
+ * | 10 | en | English | fr | French |
1424
+ * | 11 | en | English | de | German |
1425
+ * | 12 | en | English | pl | Polish |.
1426
+ * ## Common scenarios
1427
+ * Main product images and detail images for cross-border e-commerce.
1428
+ * ## Functions and features
1429
+ * * **Product body information protection**: Supports custom selection of whether to translate text on the product body. This helps protect body information such as embedded product names from being translated.
1430
+ *
1431
+ * * **Brand name protection**: Supports custom selection of whether to translate brand names on images. This helps protect brand name information from being translated.
1432
+ *
1433
+ * * **Translation intervention**: Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and no translation (ABC-empty value). This is commonly used for brand name protection scenarios. Simply pass the corresponding intervention glossary ID when calling the API to meet your translation needs in different scenarios. You can upload up to 100,000 intervention terms. If you need more, contact the platform for assistance.
1434
+ *
1435
+ * @param request - ImageTranslationPlusRequest
1436
+ * @returns ImageTranslationPlusResponse
1437
+ */
1438
+ async imageTranslationPlus(request: $_model.ImageTranslationPlusRequest): Promise<$_model.ImageTranslationPlusResponse> {
1439
+ let runtime = new $dara.RuntimeOptions({ });
1440
+ return await this.imageTranslationPlusWithOptions(request, runtime);
1441
+ }
1442
+
1325
1443
  /**
1326
1444
  * Translates text in e-commerce images using the Pro edition, which integrates multimodal foundation model technology for more accurate image understanding and significantly improved translation quality.
1327
1445
  *
@@ -2415,29 +2533,128 @@ export default class Client extends OpenApi {
2415
2533
  }
2416
2534
 
2417
2535
  /**
2418
- * 视频翻译
2536
+ * 电商视频生成(异步提交)
2419
2537
  *
2420
2538
  * @remarks
2421
- * ## 1. 产品简介
2422
- * 视频翻译 API 支持将视频画面中的嵌字(字幕、卖点文字等)翻译为目标语言,并擦除原文。适用于电商视频多语言分发、国际社交媒体营销、全球品牌广告投放等场景。
2423
- * API 采用异步调用模式:提交翻译任务后获取 `task_id`,通过查询接口轮询任务状态直至完成后获取结果。
2424
- * ## 2. 适用场景
2425
- * * **跨境电商视频本地化**:将商品介绍视频中的卖点文字翻译为目标市场语言,助力海外平台推广。
2426
- *
2427
- * * **国际社交媒体营销**:针对 TikTok、Instagram、YouTube 等平台,将视频画面文字内容一键本地化,提升海外用户理解度与转化率。
2539
+ * # 适用场景
2540
+ * - 卖家/平台批量生成商品短视频:支持多种视频比例与尺寸(3:4、9:16),适配商品详情页视频位、商品主页展示、信息流投放、短视频种草、活动会场素材等场景。
2541
+ * - 商品上新,快速生成首批视频素材:当商家有大量新品集中上架时,只需上传商品图、商品标题等基础信息,即可快速生成商品展示视频、模特上身视频、口播讲解视频等内容,帮助商家在上新阶段迅速完成素材铺设。
2542
+ * - 高保真服饰展示:基于商品主图生成更贴近真实商拍效果的模特展示视频,重点优化版型还原、面料纹理保留、颜色准确呈现、细节稳定一致等能力,支持服装上身、转身、走动、近景特写、多角度切换等常见电商展示方式。
2543
+ * - 生成高质量商拍模特:内置 20+ 套目标受众模特库,覆盖大码女性、大码男性、泳装、少女风、轻熟通勤、青年休闲、商务男装、运动健身等多体型、多肤色、多人种模特,支持站姿展示、侧身展示、走动展示、局部特写等多种商拍表达方式。
2544
+ * - 标品讲解等高频电商场景:适用于护肤品、化妆品、个护小家电、食品饮料、家清日用、3C 数码等标准化商品类目,可基于商品主图、标题、卖点信息和讲解脚本快速生成商品讲解视频。
2545
+ * - 多商品、多卖点测试,提升投放效率:面向信息流广告、短视频投放和内容种草场景,可快速生成多个版本的视频素材,便于企业低成本验证不同卖点与表现形式的转化效果,提升投放 ROI。
2546
+ * # 功能介绍
2547
+ * - 全自动端到端批量生成,零 Prompt 门槛:调用方仅需传入商品图片 URL 与标题,系统自动完成从商品理解、分镜规划到视频生成的全流程处理,无需人工编写 Prompt、选择模板或反复调参。内置商品理解、画面质检、脚本规划、编导运镜等多 Agent,大幅降低使用门槛。
2548
+ * - 高稳定生成,低废片率:采用确定性生成流程与多层质量控制机制,可在更少重试次数下输出可用素材,减少无效生成和资源浪费,整体生产成本更可控。
2549
+ * - 电商专属商品保真能力:内置多轮质检 Agent,在视频生成全程锁定商品状态(如拉链不会被拉开、袖子不会被放下、印花不会消失),通过「脚本改写 + 显式约束注入 + 失败感知重试」多层防御确保商品一致性。
2550
+ * - 参考图优先 + 6 轴一致性校验:采用 Reference-Image-First 生成范式,以原商品图作为视觉唯一事实源,自动执行 6 维度 VL 诊断(颜色漂移、图案缺失、轮廓偏移、结构增减、模特匹配、脏污检测),从机制上杜绝生成图与商品不像的问题。
2551
+ * - 灵活的分镜编排与时长控制:支持 5–30 秒可调视频时长;Agent 自主规划独立分镜展示商品在不同场景下的效果;也支持固定场景模式,在统一视觉风格下深度展示产品调性。
2552
+ * - 电影级运镜能力:内置子弹时间、格莱美慢镜头、360° 环绕旋转、模特全身旋转展示等高级运镜模式,通过分段精准控制实现确定性产出。
2553
+ * - 模特库与定制化服务:内置多类型模特资源库,支持商家指定固定模特、定制专属模特形象、长期绑定品牌视觉人设,保证品牌视觉统一性。
2554
+ * - 适配高频电商内容场景:支持 720P、1080P 等多种清晰度及 3:4、9:16等多种长宽比,适配商品详情页视频位、商品主页视频展示、瀑布流/信息流投放、活动会场素材、上新与促销视频生成。
2555
+ *
2556
+ * @param tmpReq - VideoGenerationRequest
2557
+ * @param runtime - runtime options for this request RuntimeOptions
2558
+ * @returns VideoGenerationResponse
2559
+ */
2560
+ async videoGenerationWithOptions(tmpReq: $_model.VideoGenerationRequest, runtime: $dara.RuntimeOptions): Promise<$_model.VideoGenerationResponse> {
2561
+ tmpReq.validate();
2562
+ let request = new $_model.VideoGenerationShrinkRequest({ });
2563
+ OpenApiUtil.convert(tmpReq, request);
2564
+ if (!$dara.isNull(tmpReq.input)) {
2565
+ request.inputShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.input, "Input", "json");
2566
+ }
2567
+
2568
+ if (!$dara.isNull(tmpReq.intent)) {
2569
+ request.intentShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.intent, "Intent", "json");
2570
+ }
2571
+
2572
+ if (!$dara.isNull(tmpReq.output)) {
2573
+ request.outputShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.output, "Output", "json");
2574
+ }
2575
+
2576
+ let query = { };
2577
+ if (!$dara.isNull(request.inputShrink)) {
2578
+ query["Input"] = request.inputShrink;
2579
+ }
2580
+
2581
+ if (!$dara.isNull(request.intentShrink)) {
2582
+ query["Intent"] = request.intentShrink;
2583
+ }
2584
+
2585
+ if (!$dara.isNull(request.outputShrink)) {
2586
+ query["Output"] = request.outputShrink;
2587
+ }
2588
+
2589
+ let req = new $OpenApiUtil.OpenApiRequest({
2590
+ query: OpenApiUtil.query(query),
2591
+ });
2592
+ let params = new $OpenApiUtil.Params({
2593
+ action: "VideoGeneration",
2594
+ version: "2026-04-28",
2595
+ protocol: "HTTPS",
2596
+ pathname: "/",
2597
+ method: "POST",
2598
+ authType: "AK",
2599
+ style: "RPC",
2600
+ reqBodyType: "formData",
2601
+ bodyType: "json",
2602
+ });
2603
+ return $dara.cast<$_model.VideoGenerationResponse>(await this.callApi(params, req, runtime), new $_model.VideoGenerationResponse({}));
2604
+ }
2605
+
2606
+ /**
2607
+ * 电商视频生成(异步提交)
2608
+ *
2609
+ * @remarks
2610
+ * # 适用场景
2611
+ * - 卖家/平台批量生成商品短视频:支持多种视频比例与尺寸(3:4、9:16),适配商品详情页视频位、商品主页展示、信息流投放、短视频种草、活动会场素材等场景。
2612
+ * - 商品上新,快速生成首批视频素材:当商家有大量新品集中上架时,只需上传商品图、商品标题等基础信息,即可快速生成商品展示视频、模特上身视频、口播讲解视频等内容,帮助商家在上新阶段迅速完成素材铺设。
2613
+ * - 高保真服饰展示:基于商品主图生成更贴近真实商拍效果的模特展示视频,重点优化版型还原、面料纹理保留、颜色准确呈现、细节稳定一致等能力,支持服装上身、转身、走动、近景特写、多角度切换等常见电商展示方式。
2614
+ * - 生成高质量商拍模特:内置 20+ 套目标受众模特库,覆盖大码女性、大码男性、泳装、少女风、轻熟通勤、青年休闲、商务男装、运动健身等多体型、多肤色、多人种模特,支持站姿展示、侧身展示、走动展示、局部特写等多种商拍表达方式。
2615
+ * - 标品讲解等高频电商场景:适用于护肤品、化妆品、个护小家电、食品饮料、家清日用、3C 数码等标准化商品类目,可基于商品主图、标题、卖点信息和讲解脚本快速生成商品讲解视频。
2616
+ * - 多商品、多卖点测试,提升投放效率:面向信息流广告、短视频投放和内容种草场景,可快速生成多个版本的视频素材,便于企业低成本验证不同卖点与表现形式的转化效果,提升投放 ROI。
2617
+ * # 功能介绍
2618
+ * - 全自动端到端批量生成,零 Prompt 门槛:调用方仅需传入商品图片 URL 与标题,系统自动完成从商品理解、分镜规划到视频生成的全流程处理,无需人工编写 Prompt、选择模板或反复调参。内置商品理解、画面质检、脚本规划、编导运镜等多 Agent,大幅降低使用门槛。
2619
+ * - 高稳定生成,低废片率:采用确定性生成流程与多层质量控制机制,可在更少重试次数下输出可用素材,减少无效生成和资源浪费,整体生产成本更可控。
2620
+ * - 电商专属商品保真能力:内置多轮质检 Agent,在视频生成全程锁定商品状态(如拉链不会被拉开、袖子不会被放下、印花不会消失),通过「脚本改写 + 显式约束注入 + 失败感知重试」多层防御确保商品一致性。
2621
+ * - 参考图优先 + 6 轴一致性校验:采用 Reference-Image-First 生成范式,以原商品图作为视觉唯一事实源,自动执行 6 维度 VL 诊断(颜色漂移、图案缺失、轮廓偏移、结构增减、模特匹配、脏污检测),从机制上杜绝生成图与商品不像的问题。
2622
+ * - 灵活的分镜编排与时长控制:支持 5–30 秒可调视频时长;Agent 自主规划独立分镜展示商品在不同场景下的效果;也支持固定场景模式,在统一视觉风格下深度展示产品调性。
2623
+ * - 电影级运镜能力:内置子弹时间、格莱美慢镜头、360° 环绕旋转、模特全身旋转展示等高级运镜模式,通过分段精准控制实现确定性产出。
2624
+ * - 模特库与定制化服务:内置多类型模特资源库,支持商家指定固定模特、定制专属模特形象、长期绑定品牌视觉人设,保证品牌视觉统一性。
2625
+ * - 适配高频电商内容场景:支持 720P、1080P 等多种清晰度及 3:4、9:16等多种长宽比,适配商品详情页视频位、商品主页视频展示、瀑布流/信息流投放、活动会场素材、上新与促销视频生成。
2626
+ *
2627
+ * @param request - VideoGenerationRequest
2628
+ * @returns VideoGenerationResponse
2629
+ */
2630
+ async videoGeneration(request: $_model.VideoGenerationRequest): Promise<$_model.VideoGenerationResponse> {
2631
+ let runtime = new $dara.RuntimeOptions({ });
2632
+ return await this.videoGenerationWithOptions(request, runtime);
2633
+ }
2634
+
2635
+ /**
2636
+ * Translates embedded text (subtitles, promotional text, etc.) in video frames into a target language and erases the original text.
2637
+ *
2638
+ * @remarks
2639
+ * ## 1. Product Introduction
2640
+ * The video translation API translates embedded text (subtitles, promotional text, etc.) in video frames into a target language and erases the original text. This API is applicable to scenarios such as multilingual distribution of e-commerce videos, international social media marketing, and global brand advertising.
2641
+ * The API uses an asynchronous call mode: after submitting a translation task, you obtain a `task_id`, then poll the query endpoint for the task status until the task is completed and results are available.
2642
+ * ## 2. Common scenarios
2643
+ * * **Cross-border e-commerce video localization**: Translates promotional text in product introduction videos into the target market language to facilitate overseas platform promotion.
2428
2644
  *
2429
- * * **全球品牌广告投放**:根据投放地区语言自动生成对应版本视频,减少人工制作成本。
2645
+ * * **International social media marketing**: Localizes text content in video frames with one click for platforms such as TikTok, Instagram, and YouTube, improving comprehension and conversion rates among overseas users.
2430
2646
  *
2431
- * * **培训与产品说明**:将培训课程或产品演示视频中的画面文字翻译为多语言版本,方便全球团队使用。
2647
+ * * **Global brand advertising**: Automatically generates video versions in the language of the target region, reducing manual production costs.
2432
2648
  *
2433
- * ## 3. 功能介绍
2434
- * | 能力 | 标识码 | 说明 |
2649
+ * * **Training and product documentation**: Translates on-screen text in training courses or product demonstration videos into multiple languages for use by global teams.
2650
+ * ## 3. Features
2651
+ * | Capability | Identifier | Description |
2435
2652
  * | --- | --- | --- |
2436
- * | 画面翻译 | `visual` | 翻译视频画面中的嵌字(字幕、卖点文字等),并擦除原文 |
2437
- * ## 4. 开发指南
2438
- * ### 4.1 提交翻译任务
2439
- * #### 请求
2440
- * `POST /api/v1/video/translation`
2653
+ * | Visual translation | `visual` | Translates embedded text (subtitles, promotional text, etc.) in video frames into the target language and erases the original text |
2654
+ * ## 4. Developer guide.
2655
+ * ### 4.1 Submit a translation task.
2656
+ * #### Request
2657
+ * `POST /api/v1/video/translation`
2441
2658
  *
2442
2659
  * @param tmpReq - VideoTranslationRequest
2443
2660
  * @param runtime - runtime options for this request RuntimeOptions
@@ -2486,29 +2703,28 @@ export default class Client extends OpenApi {
2486
2703
  }
2487
2704
 
2488
2705
  /**
2489
- * 视频翻译
2706
+ * Translates embedded text (subtitles, promotional text, etc.) in video frames into a target language and erases the original text.
2490
2707
  *
2491
2708
  * @remarks
2492
- * ## 1. 产品简介
2493
- * 视频翻译 API 支持将视频画面中的嵌字(字幕、卖点文字等)翻译为目标语言,并擦除原文。适用于电商视频多语言分发、国际社交媒体营销、全球品牌广告投放等场景。
2494
- * API 采用异步调用模式:提交翻译任务后获取 `task_id`,通过查询接口轮询任务状态直至完成后获取结果。
2495
- * ## 2. 适用场景
2496
- * * **跨境电商视频本地化**:将商品介绍视频中的卖点文字翻译为目标市场语言,助力海外平台推广。
2497
- *
2498
- * * **国际社交媒体营销**:针对 TikTok、Instagram、YouTube 等平台,将视频画面文字内容一键本地化,提升海外用户理解度与转化率。
2709
+ * ## 1. Product Introduction
2710
+ * The video translation API translates embedded text (subtitles, promotional text, etc.) in video frames into a target language and erases the original text. This API is applicable to scenarios such as multilingual distribution of e-commerce videos, international social media marketing, and global brand advertising.
2711
+ * The API uses an asynchronous call mode: after submitting a translation task, you obtain a `task_id`, then poll the query endpoint for the task status until the task is completed and results are available.
2712
+ * ## 2. Common scenarios
2713
+ * * **Cross-border e-commerce video localization**: Translates promotional text in product introduction videos into the target market language to facilitate overseas platform promotion.
2499
2714
  *
2500
- * * **全球品牌广告投放**:根据投放地区语言自动生成对应版本视频,减少人工制作成本。
2715
+ * * **International social media marketing**: Localizes text content in video frames with one click for platforms such as TikTok, Instagram, and YouTube, improving comprehension and conversion rates among overseas users.
2501
2716
  *
2502
- * * **培训与产品说明**:将培训课程或产品演示视频中的画面文字翻译为多语言版本,方便全球团队使用。
2717
+ * * **Global brand advertising**: Automatically generates video versions in the language of the target region, reducing manual production costs.
2503
2718
  *
2504
- * ## 3. 功能介绍
2505
- * | 能力 | 标识码 | 说明 |
2719
+ * * **Training and product documentation**: Translates on-screen text in training courses or product demonstration videos into multiple languages for use by global teams.
2720
+ * ## 3. Features
2721
+ * | Capability | Identifier | Description |
2506
2722
  * | --- | --- | --- |
2507
- * | 画面翻译 | `visual` | 翻译视频画面中的嵌字(字幕、卖点文字等),并擦除原文 |
2508
- * ## 4. 开发指南
2509
- * ### 4.1 提交翻译任务
2510
- * #### 请求
2511
- * `POST /api/v1/video/translation`
2723
+ * | Visual translation | `visual` | Translates embedded text (subtitles, promotional text, etc.) in video frames into the target language and erases the original text |
2724
+ * ## 4. Developer guide.
2725
+ * ### 4.1 Submit a translation task.
2726
+ * #### Request
2727
+ * `POST /api/v1/video/translation`
2512
2728
  *
2513
2729
  * @param request - VideoTranslationRequest
2514
2730
  * @returns VideoTranslationResponse
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
5
5
  export class DocumentTranslateRequest extends $dara.Model {
6
6
  /**
7
7
  * @remarks
8
- * The supported document types: PDF or Word. Size limits: Word 200 MB/300 pages, PDF 200 MB/300 pages, maximum 200 MB per file.
8
+ * The supported document types: PDF/Word. Size limits: Word 200 MB/100 pages, PDF 200 MB/100 pages, maximum 200 MB per file.
9
9
  *
10
10
  * This parameter is required.
11
11
  *
@@ -15,7 +15,7 @@ export class DocumentTranslateRequest extends $dara.Model {
15
15
  fileType?: string;
16
16
  /**
17
17
  * @remarks
18
- * The glossary ID to use when the glossary feature is required. Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and skip translation (ABC-empty value). Commonly used for brand name protection scenarios.
18
+ * The intervention glossary ID. Specify this parameter when you need the intervention feature. Supports custom translation results, including do-not-translate (ABC-ABC), specified translation (ABC-DEF), and skip translation (ABC-empty value). Commonly used for brand name protection scenarios.
19
19
  *
20
20
  * @example
21
21
  * glossary_1
@@ -64,7 +64,7 @@ export class DocumentTranslateResponseBody extends $dara.Model {
64
64
  requestId?: string;
65
65
  /**
66
66
  * @remarks
67
- * Indicates whether the call is successful. Valid values: true: The call is successful. false: The call failed.
67
+ * Indicates whether the call is successful. true: successful. false: failed.
68
68
  *
69
69
  * @example
70
70
  * True
@@ -0,0 +1,100 @@
1
+ // This file is auto-generated, don't edit it
2
+ import * as $dara from '@darabonba/typescript';
3
+
4
+
5
+ export class ImageTranslationPlusRequest extends $dara.Model {
6
+ /**
7
+ * @remarks
8
+ * The ID of the intervention glossary. This parameter is optional.
9
+ *
10
+ * @example
11
+ * glossary-001
12
+ */
13
+ glossary?: string;
14
+ /**
15
+ * @remarks
16
+ * The URL of the original image. This parameter is required.
17
+ *
18
+ * This parameter is required.
19
+ *
20
+ * @example
21
+ * https://img.alicdn.com/example.png
22
+ */
23
+ imageUrl?: string;
24
+ /**
25
+ * @remarks
26
+ * Specifies whether to translate text on the product body. This parameter is optional. Default value: false.
27
+ *
28
+ * @example
29
+ * false
30
+ */
31
+ includingProductArea?: boolean;
32
+ /**
33
+ * @remarks
34
+ * The source language. This parameter is required.
35
+ *
36
+ * This parameter is required.
37
+ *
38
+ * @example
39
+ * zh
40
+ */
41
+ sourceLanguage?: string;
42
+ /**
43
+ * @remarks
44
+ * The target language. This parameter is required.
45
+ *
46
+ * This parameter is required.
47
+ *
48
+ * @example
49
+ * en
50
+ */
51
+ targetLanguage?: string;
52
+ /**
53
+ * @remarks
54
+ * Specifies whether to translate brand text on the product. This parameter is optional. Default value: false.
55
+ *
56
+ * @example
57
+ * false
58
+ */
59
+ translatingBrandInTheProduct?: boolean;
60
+ /**
61
+ * @remarks
62
+ * Specifies whether to use the image translation editor protocol. This parameter is optional.
63
+ *
64
+ * @example
65
+ * false
66
+ */
67
+ useImageEditor?: boolean;
68
+ static names(): { [key: string]: string } {
69
+ return {
70
+ glossary: 'Glossary',
71
+ imageUrl: 'ImageUrl',
72
+ includingProductArea: 'IncludingProductArea',
73
+ sourceLanguage: 'SourceLanguage',
74
+ targetLanguage: 'TargetLanguage',
75
+ translatingBrandInTheProduct: 'TranslatingBrandInTheProduct',
76
+ useImageEditor: 'UseImageEditor',
77
+ };
78
+ }
79
+
80
+ static types(): { [key: string]: any } {
81
+ return {
82
+ glossary: 'string',
83
+ imageUrl: 'string',
84
+ includingProductArea: 'boolean',
85
+ sourceLanguage: 'string',
86
+ targetLanguage: 'string',
87
+ translatingBrandInTheProduct: 'boolean',
88
+ useImageEditor: 'boolean',
89
+ };
90
+ }
91
+
92
+ validate() {
93
+ super.validate();
94
+ }
95
+
96
+ constructor(map?: { [key: string]: any }) {
97
+ super(map);
98
+ }
99
+ }
100
+
@@ -0,0 +1,40 @@
1
+ // This file is auto-generated, don't edit it
2
+ import * as $dara from '@darabonba/typescript';
3
+ import { ImageTranslationPlusResponseBody } from "./ImageTranslationPlusResponseBody";
4
+
5
+
6
+ export class ImageTranslationPlusResponse extends $dara.Model {
7
+ headers?: { [key: string]: string };
8
+ statusCode?: number;
9
+ body?: ImageTranslationPlusResponseBody;
10
+ static names(): { [key: string]: string } {
11
+ return {
12
+ headers: 'headers',
13
+ statusCode: 'statusCode',
14
+ body: 'body',
15
+ };
16
+ }
17
+
18
+ static types(): { [key: string]: any } {
19
+ return {
20
+ headers: { 'type': 'map', 'keyType': 'string', 'valueType': 'string' },
21
+ statusCode: 'number',
22
+ body: ImageTranslationPlusResponseBody,
23
+ };
24
+ }
25
+
26
+ validate() {
27
+ if(this.headers) {
28
+ $dara.Model.validateMap(this.headers);
29
+ }
30
+ if(this.body && typeof (this.body as any).validate === 'function') {
31
+ (this.body as any).validate();
32
+ }
33
+ super.validate();
34
+ }
35
+
36
+ constructor(map?: { [key: string]: any }) {
37
+ super(map);
38
+ }
39
+ }
40
+