@alicloud/aidge20260428 5.12.0 → 5.12.2
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 +72 -76
- package/dist/client.js +76 -76
- package/dist/client.js.map +1 -1
- package/dist/models/ImageUpscaleRequest.d.ts +1 -1
- package/dist/models/ImageUpscaleResponseBody.d.ts +5 -5
- package/dist/models/VisionFlowRequest.d.ts +17 -17
- package/dist/models/VisionFlowResponseBody.d.ts +6 -6
- package/dist/models/VisionFlowShrinkRequest.d.ts +17 -17
- package/package.json +2 -1
- package/src/client.ts +76 -76
- package/src/models/ImageUpscaleRequest.ts +1 -1
- package/src/models/ImageUpscaleResponseBody.ts +5 -5
- package/src/models/VisionFlowRequest.ts +17 -17
- package/src/models/VisionFlowResponseBody.ts +6 -6
- package/src/models/VisionFlowShrinkRequest.ts +17 -17
package/src/client.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// This file is auto-generated, don't edit it
|
|
2
2
|
import * as $dara from '@darabonba/typescript';
|
|
3
|
+
import GatewayClient from '@alicloud/gateway-pop';
|
|
3
4
|
import OpenApi from '@alicloud/openapi-core';
|
|
4
5
|
import { OpenApiUtil, $OpenApiUtil }from '@alicloud/openapi-core';
|
|
5
6
|
|
|
@@ -11,6 +12,9 @@ export default class Client extends OpenApi {
|
|
|
11
12
|
|
|
12
13
|
constructor(config: $OpenApiUtil.Config) {
|
|
13
14
|
super(config);
|
|
15
|
+
this._productId = "Aidge";
|
|
16
|
+
let gatewayClient = new GatewayClient();
|
|
17
|
+
this._spi = gatewayClient;
|
|
14
18
|
this._endpointRule = "regional";
|
|
15
19
|
this.checkConfig(config);
|
|
16
20
|
this._endpoint = this.getEndpoint("aidge", this._regionId, this._endpointRule, this._network, this._suffix, this._endpointMap, this._endpoint);
|
|
@@ -3382,23 +3386,21 @@ export default class Client extends OpenApi {
|
|
|
3382
3386
|
}
|
|
3383
3387
|
|
|
3384
3388
|
/**
|
|
3385
|
-
*
|
|
3389
|
+
* Upscales e-commerce images by intelligently enhancing resolution and details, improving textures and image quality during the upscaling process. Supports high-definition outputs such as 2K and 4K to meet the requirements for product main images, detail images, and marketing materials, and enables efficient processing of large batches of images to improve overall image quality. (Synchronous)
|
|
3386
3390
|
*
|
|
3387
3391
|
* @remarks
|
|
3388
3392
|
* # Product introduction
|
|
3389
|
-
* The high-definition upscaling product is
|
|
3393
|
+
* The high-definition upscaling product is customized for e-commerce images. It intelligently enhances image resolution and details, improves textures and image quality during the upscaling process, and supports high-definition outputs such as 2K and 4K. It meets the high-definition requirements for product main images, detail images, and marketing materials, enabling efficient and clear processing of large batches of images to improve product image quality. (Synchronous)
|
|
3390
3394
|
* # Scenarios
|
|
3391
3395
|
* * High-definition e-commerce product images: Enhances the resolution and details of product main images, detail images, and marketing materials to make textures and materials clearer and improve product display quality.
|
|
3392
|
-
*
|
|
3393
|
-
* *
|
|
3394
|
-
*
|
|
3395
|
-
* * Batch optimization of existing images: Enhances existing low-resolution product images in high definition to reduce reshooting and production costs and improve the reuse efficiency of image materials.
|
|
3396
|
+
* * Multi-platform product material adaptation: Upscales existing product images to high definition to meet the image display requirements of different e-commerce platforms and adapt to multi-platform and multi-scenario material usage needs.
|
|
3397
|
+
* * Batch optimization of existing images: Enhances existing low-resolution product images to high definition, reducing the costs of reshooting and remaking, and improving the reuse efficiency of image materials.
|
|
3396
3398
|
* # Features
|
|
3397
|
-
* 1. Intelligent high-definition upscaling:
|
|
3399
|
+
* 1. Intelligent high-definition upscaling: Based on AI image enhancement technology, it improves the resolution and optimizes the details of input images to enhance image clarity and texture representation.
|
|
3398
3400
|
*
|
|
3399
|
-
* 2. Multiple upscaling factors: Supports 2x and 4x upscaling factors
|
|
3401
|
+
* 2. Multiple upscaling factors: Supports 2x and 4x upscaling factors, allowing flexible selection based on image quality and business requirements.
|
|
3400
3402
|
*
|
|
3401
|
-
* 3. Synchronous API calls: Supports synchronous submission of images and retrieval of processing results through
|
|
3403
|
+
* 3. Synchronous API calls: Supports synchronous submission of images and retrieval of processing results through APIs, facilitating integration into e-commerce image processing workflows.
|
|
3402
3404
|
* # Effect comparison
|
|
3403
3405
|
* | **Original image** | **Upscaled image** |
|
|
3404
3406
|
* | --- | --- |
|
|
@@ -3437,23 +3439,21 @@ export default class Client extends OpenApi {
|
|
|
3437
3439
|
}
|
|
3438
3440
|
|
|
3439
3441
|
/**
|
|
3440
|
-
*
|
|
3442
|
+
* Upscales e-commerce images by intelligently enhancing resolution and details, improving textures and image quality during the upscaling process. Supports high-definition outputs such as 2K and 4K to meet the requirements for product main images, detail images, and marketing materials, and enables efficient processing of large batches of images to improve overall image quality. (Synchronous)
|
|
3441
3443
|
*
|
|
3442
3444
|
* @remarks
|
|
3443
3445
|
* # Product introduction
|
|
3444
|
-
* The high-definition upscaling product is
|
|
3446
|
+
* The high-definition upscaling product is customized for e-commerce images. It intelligently enhances image resolution and details, improves textures and image quality during the upscaling process, and supports high-definition outputs such as 2K and 4K. It meets the high-definition requirements for product main images, detail images, and marketing materials, enabling efficient and clear processing of large batches of images to improve product image quality. (Synchronous)
|
|
3445
3447
|
* # Scenarios
|
|
3446
3448
|
* * High-definition e-commerce product images: Enhances the resolution and details of product main images, detail images, and marketing materials to make textures and materials clearer and improve product display quality.
|
|
3447
|
-
*
|
|
3448
|
-
* *
|
|
3449
|
-
*
|
|
3450
|
-
* * Batch optimization of existing images: Enhances existing low-resolution product images in high definition to reduce reshooting and production costs and improve the reuse efficiency of image materials.
|
|
3449
|
+
* * Multi-platform product material adaptation: Upscales existing product images to high definition to meet the image display requirements of different e-commerce platforms and adapt to multi-platform and multi-scenario material usage needs.
|
|
3450
|
+
* * Batch optimization of existing images: Enhances existing low-resolution product images to high definition, reducing the costs of reshooting and remaking, and improving the reuse efficiency of image materials.
|
|
3451
3451
|
* # Features
|
|
3452
|
-
* 1. Intelligent high-definition upscaling:
|
|
3452
|
+
* 1. Intelligent high-definition upscaling: Based on AI image enhancement technology, it improves the resolution and optimizes the details of input images to enhance image clarity and texture representation.
|
|
3453
3453
|
*
|
|
3454
|
-
* 2. Multiple upscaling factors: Supports 2x and 4x upscaling factors
|
|
3454
|
+
* 2. Multiple upscaling factors: Supports 2x and 4x upscaling factors, allowing flexible selection based on image quality and business requirements.
|
|
3455
3455
|
*
|
|
3456
|
-
* 3. Synchronous API calls: Supports synchronous submission of images and retrieval of processing results through
|
|
3456
|
+
* 3. Synchronous API calls: Supports synchronous submission of images and retrieval of processing results through APIs, facilitating integration into e-commerce image processing workflows.
|
|
3457
3457
|
* # Effect comparison
|
|
3458
3458
|
* | **Original image** | **Upscaled image** |
|
|
3459
3459
|
* | --- | --- |
|
|
@@ -6078,61 +6078,61 @@ export default class Client extends OpenApi {
|
|
|
6078
6078
|
}
|
|
6079
6079
|
|
|
6080
6080
|
/**
|
|
6081
|
-
* Provides a one-stop AI
|
|
6081
|
+
* Provides a one-stop AI image processing service for e-commerce sellers. Orchestrates six atomic capabilities—element recognition, intelligent cutout, intelligent erasure, image translation Pro, intelligent cropping, and high-definition upscaling—into an image processing workflow. Users can upload an image once, select the required capabilities, and complete multiple image optimizations in sequence to output product images that meet the requirements of e-commerce platforms. (Asynchronous)
|
|
6082
6082
|
*
|
|
6083
6083
|
* @remarks
|
|
6084
|
-
* # 1. Product
|
|
6085
|
-
*
|
|
6086
|
-
* # 2.
|
|
6087
|
-
* Applicable to batch optimization of product images in cross-platform listing scenarios. Adapts source product images into main images, SKU images, and detail images required by listing platforms.
|
|
6088
|
-
* *
|
|
6084
|
+
* # 1. Product introduction
|
|
6085
|
+
* Provides a one-stop AI image processing service for e-commerce sellers. Orchestrates six atomic capabilities—element recognition, intelligent cutout, intelligent erasure, image translation Pro, intelligent cropping, and high-definition upscaling—into an image processing workflow. Users can upload an image once, select the required capabilities, and complete multiple image optimizations in sequence to output product images that meet the requirements of e-commerce platforms. (Asynchronous)
|
|
6086
|
+
* # 2. Scenarios
|
|
6087
|
+
* Applicable to batch optimization of product images in cross-platform listing scenarios. Adapts source product images into main images, SKU images, and detail images required by listing platforms. Supports the following operations:
|
|
6088
|
+
* * Identifies low-quality images with text, watermarks, logos, or cluttered text, and allows users to filter the images to be processed.
|
|
6089
6089
|
*
|
|
6090
|
-
* *
|
|
6090
|
+
* * Removes non-compliant elements such as watermarks, logos, cluttered text, and Chinese text from the original image.
|
|
6091
6091
|
*
|
|
6092
|
-
* *
|
|
6092
|
+
* * Removes the background around the main product subject.
|
|
6093
6093
|
*
|
|
6094
|
-
* *
|
|
6094
|
+
* * Translates text in the image into other languages.
|
|
6095
6095
|
*
|
|
6096
|
-
* *
|
|
6096
|
+
* * Expands the image to other sizes (by ratio or dimensions) and automatically fills the background.
|
|
6097
6097
|
*
|
|
6098
|
-
* *
|
|
6098
|
+
* * Crops the image to a specified size.
|
|
6099
6099
|
*
|
|
6100
|
-
* *
|
|
6100
|
+
* * Upscales the image pixels by a specified factor.
|
|
6101
6101
|
* # 3. Features
|
|
6102
|
-
*
|
|
6102
|
+
* Users input the URL of a product image and select the required AI capabilities through the Ability parameter (1=Intelligent element recognition, 2=Intelligent cutout, 3=Intelligent erasure, 4=Image translation Pro, 5=Image expansion, 6=Intelligent cropping, 7=High-definition upscaling). The system executes the selected capabilities in a preset sequence. Because intelligent element recognition helps users determine whether an image contains specific elements, and the presence of these elements affects the selection of subsequent AI capabilities, an additional input option is provided. This option allows users to choose whether to filter out images from subsequent AI processing or retain them without further processing.
|
|
6103
6103
|
* 
|
|
6104
|
-
*
|
|
6105
|
-
* 1.
|
|
6104
|
+
* The following section describes each AI capability:
|
|
6105
|
+
* **1. Intelligent element recognition**: An element detection capability designed specifically for e-commerce images. It identifies elements such as text, logos, watermarks, and text blocks in the subject and background of an image, and returns Boolean detection results. Users can filter images based on the recognition results (for example, processing only images with watermarks) and link this capability with subsequent ones—first identifying the types of elements to be optimized, and then precisely executing operations such as erasure.
|
|
6106
6106
|
*
|
|
6107
|
-
* 2.
|
|
6107
|
+
* **2. Intelligent cutout**: Automatically identifies the main product subject in an image and precisely separates it from the background. Based on deep learning models, it supports precise segmentation of complex edges such as hair and transparent objects. It can output images with transparent or white backgrounds, supports custom background colors and target size cropping, and directly generates product display images that comply with e-commerce platform specifications.
|
|
6108
6108
|
*
|
|
6109
|
-
* 3.
|
|
6109
|
+
* **3. Intelligent erasure**: Automatically identifies and removes non-compliant elements in e-commerce images, such as text, specific names (brand or store names), transparent text blocks, and cluttered text. It supports specifying the removal of elements in the subject area or non-subject area separately. It also supports precisely specifying the removal area through the Mask parameter to achieve efficient and compliant cleanup of large batches of images.
|
|
6110
6110
|
*
|
|
6111
|
-
* 4.
|
|
6111
|
+
* **4. Image translation Pro**: Integrates multimodal large model technology to translate text in an image into a target language and directly renders it in the corresponding position of the original image. It supports over 100 language pairs. It provides features such as product subject text protection, brand name protection, and translation intervention glossaries to avoid mistranslating embedded product information. After translation, it can return layout information such as text position, font, and color to support secondary editing.
|
|
6112
6112
|
*
|
|
6113
|
-
* 5.
|
|
6113
|
+
* **5. Intelligent image expansion**: Expands the image canvas based on AI generation technology to broaden the image field of view without cropping the subject. It supports multiple expansion methods: expanding by aspect ratio (1:1, 3:4, 4:3, 9:16, 16:9), scaling by horizontal or vertical proportion (1.0 to 3.0 times), and shifting pixels in the up, down, left, or right directions. The AI automatically fills and generates naturally transitioning background content.
|
|
6114
6114
|
*
|
|
6115
|
-
* 6.
|
|
6115
|
+
* **6. Intelligent cropping**: Intelligently crops images to specified sizes, automatically identifies the main subject area of the image, and precisely retains the core content. It supports custom output width and height (100 to 5000 pixels) and adapts to the image size requirements of different e-commerce platforms and ad slots, ensuring that the subject stands out and the picture is balanced after cropping.
|
|
6116
6116
|
*
|
|
6117
|
-
* 7.
|
|
6118
|
-
* # 4.
|
|
6117
|
+
* **7. High-definition upscaling**: Enhances details and reduces noise while upscaling the image. It supports 2x to 4x upscaling. It is applicable to improving the clarity of low-resolution product images and optimizing visual presentation. It supports output in formats such as PNG, JPG, and BMP.
|
|
6118
|
+
* # 4. Effect comparison
|
|
6119
6119
|
* | **Original image** | **Capabilities used** | **Output image** |
|
|
6120
6120
|
* | --- | --- | --- |
|
|
6121
|
-
* |  | * Intelligent
|
|
6121
|
+
* |  | * Intelligent recognition
|
|
6122
6122
|
*
|
|
6123
|
-
* * Image
|
|
6123
|
+
* * Image translation Pro
|
|
6124
6124
|
*
|
|
6125
6125
|
* * Intelligent cropping |  |
|
|
6126
|
-
* |  | * Intelligent
|
|
6126
|
+
* |  | * Intelligent cutout
|
|
6127
6127
|
*
|
|
6128
|
-
* * Intelligent
|
|
6128
|
+
* * Intelligent erasure
|
|
6129
6129
|
*
|
|
6130
6130
|
* * Intelligent cropping |  |
|
|
6131
|
-
* |  | * Intelligent
|
|
6131
|
+
* |  | * Intelligent recognition
|
|
6132
6132
|
*
|
|
6133
|
-
* * Intelligent
|
|
6133
|
+
* * Intelligent erasure
|
|
6134
6134
|
*
|
|
6135
|
-
* *
|
|
6135
|
+
* * High-definition upscaling |  |
|
|
6136
6136
|
*
|
|
6137
6137
|
* @param tmpReq - VisionFlowRequest
|
|
6138
6138
|
* @param runtime - runtime options for this request RuntimeOptions
|
|
@@ -6249,61 +6249,61 @@ export default class Client extends OpenApi {
|
|
|
6249
6249
|
}
|
|
6250
6250
|
|
|
6251
6251
|
/**
|
|
6252
|
-
* Provides a one-stop AI
|
|
6252
|
+
* Provides a one-stop AI image processing service for e-commerce sellers. Orchestrates six atomic capabilities—element recognition, intelligent cutout, intelligent erasure, image translation Pro, intelligent cropping, and high-definition upscaling—into an image processing workflow. Users can upload an image once, select the required capabilities, and complete multiple image optimizations in sequence to output product images that meet the requirements of e-commerce platforms. (Asynchronous)
|
|
6253
6253
|
*
|
|
6254
6254
|
* @remarks
|
|
6255
|
-
* # 1. Product
|
|
6256
|
-
*
|
|
6257
|
-
* # 2.
|
|
6258
|
-
* Applicable to batch optimization of product images in cross-platform listing scenarios. Adapts source product images into main images, SKU images, and detail images required by listing platforms.
|
|
6259
|
-
* *
|
|
6255
|
+
* # 1. Product introduction
|
|
6256
|
+
* Provides a one-stop AI image processing service for e-commerce sellers. Orchestrates six atomic capabilities—element recognition, intelligent cutout, intelligent erasure, image translation Pro, intelligent cropping, and high-definition upscaling—into an image processing workflow. Users can upload an image once, select the required capabilities, and complete multiple image optimizations in sequence to output product images that meet the requirements of e-commerce platforms. (Asynchronous)
|
|
6257
|
+
* # 2. Scenarios
|
|
6258
|
+
* Applicable to batch optimization of product images in cross-platform listing scenarios. Adapts source product images into main images, SKU images, and detail images required by listing platforms. Supports the following operations:
|
|
6259
|
+
* * Identifies low-quality images with text, watermarks, logos, or cluttered text, and allows users to filter the images to be processed.
|
|
6260
6260
|
*
|
|
6261
|
-
* *
|
|
6261
|
+
* * Removes non-compliant elements such as watermarks, logos, cluttered text, and Chinese text from the original image.
|
|
6262
6262
|
*
|
|
6263
|
-
* *
|
|
6263
|
+
* * Removes the background around the main product subject.
|
|
6264
6264
|
*
|
|
6265
|
-
* *
|
|
6265
|
+
* * Translates text in the image into other languages.
|
|
6266
6266
|
*
|
|
6267
|
-
* *
|
|
6267
|
+
* * Expands the image to other sizes (by ratio or dimensions) and automatically fills the background.
|
|
6268
6268
|
*
|
|
6269
|
-
* *
|
|
6269
|
+
* * Crops the image to a specified size.
|
|
6270
6270
|
*
|
|
6271
|
-
* *
|
|
6271
|
+
* * Upscales the image pixels by a specified factor.
|
|
6272
6272
|
* # 3. Features
|
|
6273
|
-
*
|
|
6273
|
+
* Users input the URL of a product image and select the required AI capabilities through the Ability parameter (1=Intelligent element recognition, 2=Intelligent cutout, 3=Intelligent erasure, 4=Image translation Pro, 5=Image expansion, 6=Intelligent cropping, 7=High-definition upscaling). The system executes the selected capabilities in a preset sequence. Because intelligent element recognition helps users determine whether an image contains specific elements, and the presence of these elements affects the selection of subsequent AI capabilities, an additional input option is provided. This option allows users to choose whether to filter out images from subsequent AI processing or retain them without further processing.
|
|
6274
6274
|
* 
|
|
6275
|
-
*
|
|
6276
|
-
* 1.
|
|
6275
|
+
* The following section describes each AI capability:
|
|
6276
|
+
* **1. Intelligent element recognition**: An element detection capability designed specifically for e-commerce images. It identifies elements such as text, logos, watermarks, and text blocks in the subject and background of an image, and returns Boolean detection results. Users can filter images based on the recognition results (for example, processing only images with watermarks) and link this capability with subsequent ones—first identifying the types of elements to be optimized, and then precisely executing operations such as erasure.
|
|
6277
6277
|
*
|
|
6278
|
-
* 2.
|
|
6278
|
+
* **2. Intelligent cutout**: Automatically identifies the main product subject in an image and precisely separates it from the background. Based on deep learning models, it supports precise segmentation of complex edges such as hair and transparent objects. It can output images with transparent or white backgrounds, supports custom background colors and target size cropping, and directly generates product display images that comply with e-commerce platform specifications.
|
|
6279
6279
|
*
|
|
6280
|
-
* 3.
|
|
6280
|
+
* **3. Intelligent erasure**: Automatically identifies and removes non-compliant elements in e-commerce images, such as text, specific names (brand or store names), transparent text blocks, and cluttered text. It supports specifying the removal of elements in the subject area or non-subject area separately. It also supports precisely specifying the removal area through the Mask parameter to achieve efficient and compliant cleanup of large batches of images.
|
|
6281
6281
|
*
|
|
6282
|
-
* 4.
|
|
6282
|
+
* **4. Image translation Pro**: Integrates multimodal large model technology to translate text in an image into a target language and directly renders it in the corresponding position of the original image. It supports over 100 language pairs. It provides features such as product subject text protection, brand name protection, and translation intervention glossaries to avoid mistranslating embedded product information. After translation, it can return layout information such as text position, font, and color to support secondary editing.
|
|
6283
6283
|
*
|
|
6284
|
-
* 5.
|
|
6284
|
+
* **5. Intelligent image expansion**: Expands the image canvas based on AI generation technology to broaden the image field of view without cropping the subject. It supports multiple expansion methods: expanding by aspect ratio (1:1, 3:4, 4:3, 9:16, 16:9), scaling by horizontal or vertical proportion (1.0 to 3.0 times), and shifting pixels in the up, down, left, or right directions. The AI automatically fills and generates naturally transitioning background content.
|
|
6285
6285
|
*
|
|
6286
|
-
* 6.
|
|
6286
|
+
* **6. Intelligent cropping**: Intelligently crops images to specified sizes, automatically identifies the main subject area of the image, and precisely retains the core content. It supports custom output width and height (100 to 5000 pixels) and adapts to the image size requirements of different e-commerce platforms and ad slots, ensuring that the subject stands out and the picture is balanced after cropping.
|
|
6287
6287
|
*
|
|
6288
|
-
* 7.
|
|
6289
|
-
* # 4.
|
|
6288
|
+
* **7. High-definition upscaling**: Enhances details and reduces noise while upscaling the image. It supports 2x to 4x upscaling. It is applicable to improving the clarity of low-resolution product images and optimizing visual presentation. It supports output in formats such as PNG, JPG, and BMP.
|
|
6289
|
+
* # 4. Effect comparison
|
|
6290
6290
|
* | **Original image** | **Capabilities used** | **Output image** |
|
|
6291
6291
|
* | --- | --- | --- |
|
|
6292
|
-
* |  | * Intelligent
|
|
6292
|
+
* |  | * Intelligent recognition
|
|
6293
6293
|
*
|
|
6294
|
-
* * Image
|
|
6294
|
+
* * Image translation Pro
|
|
6295
6295
|
*
|
|
6296
6296
|
* * Intelligent cropping |  |
|
|
6297
|
-
* |  | * Intelligent
|
|
6297
|
+
* |  | * Intelligent cutout
|
|
6298
6298
|
*
|
|
6299
|
-
* * Intelligent
|
|
6299
|
+
* * Intelligent erasure
|
|
6300
6300
|
*
|
|
6301
6301
|
* * Intelligent cropping |  |
|
|
6302
|
-
* |  | * Intelligent
|
|
6302
|
+
* |  | * Intelligent recognition
|
|
6303
6303
|
*
|
|
6304
|
-
* * Intelligent
|
|
6304
|
+
* * Intelligent erasure
|
|
6305
6305
|
*
|
|
6306
|
-
* *
|
|
6306
|
+
* * High-definition upscaling |  |
|
|
6307
6307
|
*
|
|
6308
6308
|
* @param request - VisionFlowRequest
|
|
6309
6309
|
* @returns VisionFlowResponse
|
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class ImageUpscaleRequest extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The URL of the original image. It must be a publicly accessible image URL.
|
|
8
|
+
* The URL of the original image. It must be a publicly accessible image URL. You cannot use private network addresses such as localhost. The width and height of the input image must be greater than 100 pixels and less than 3000 pixels. The width and height of the upscaled image must not exceed 3000 pixels.
|
|
9
9
|
*
|
|
10
10
|
* This parameter is required.
|
|
11
11
|
*
|
|
@@ -13,7 +13,7 @@ export class ImageUpscaleResponseBodyDataData extends $dara.Model {
|
|
|
13
13
|
imageHeight?: number;
|
|
14
14
|
/**
|
|
15
15
|
* @remarks
|
|
16
|
-
* The result information of the
|
|
16
|
+
* The result information of the high-definition upscaling for a single image.
|
|
17
17
|
*
|
|
18
18
|
* @example
|
|
19
19
|
* https://example.com/output.png
|
|
@@ -90,7 +90,7 @@ export class ImageUpscaleResponseBodyData extends $dara.Model {
|
|
|
90
90
|
data?: ImageUpscaleResponseBodyDataData;
|
|
91
91
|
/**
|
|
92
92
|
* @remarks
|
|
93
|
-
* The error code
|
|
93
|
+
* The error code. Returned upon failure, such as InvalidParameter or DownstreamUnavailable.
|
|
94
94
|
*
|
|
95
95
|
* @example
|
|
96
96
|
* success
|
|
@@ -98,7 +98,7 @@ export class ImageUpscaleResponseBodyData extends $dara.Model {
|
|
|
98
98
|
errorCode?: string;
|
|
99
99
|
/**
|
|
100
100
|
* @remarks
|
|
101
|
-
* The error message
|
|
101
|
+
* The error message. Returned upon failure.
|
|
102
102
|
*
|
|
103
103
|
* @example
|
|
104
104
|
* Success
|
|
@@ -106,7 +106,7 @@ export class ImageUpscaleResponseBodyData extends $dara.Model {
|
|
|
106
106
|
errorMessage?: string;
|
|
107
107
|
/**
|
|
108
108
|
* @remarks
|
|
109
|
-
* Indicates whether the
|
|
109
|
+
* Indicates whether the operation is successful. A value of true indicates success, and a value of false indicates failure.
|
|
110
110
|
*
|
|
111
111
|
* @example
|
|
112
112
|
* True
|
|
@@ -114,7 +114,7 @@ export class ImageUpscaleResponseBodyData extends $dara.Model {
|
|
|
114
114
|
success?: boolean;
|
|
115
115
|
/**
|
|
116
116
|
* @remarks
|
|
117
|
-
* The
|
|
117
|
+
* The downstream task ID. This parameter is empty for synchronous operations.
|
|
118
118
|
*
|
|
119
119
|
* @example
|
|
120
120
|
* ed9d8504-6141-9fbb-8345-4fa36433483f
|
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class VisionFlowRequest extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The AI capabilities to
|
|
8
|
+
* The AI capabilities to be processed. Multiple values are supported. Valid values: 1 (Intelligent element recognition), 2 (Intelligent cutout), 3 (Intelligent erasure), 4 (Image translation Pro), 5 (Intelligent cropping), and 6 (High-definition upscaling).
|
|
9
9
|
*
|
|
10
10
|
* This parameter is required.
|
|
11
11
|
*
|
|
@@ -15,7 +15,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
15
15
|
ability?: number[];
|
|
16
16
|
/**
|
|
17
17
|
* @remarks
|
|
18
|
-
* The background type of the
|
|
18
|
+
* The background type of the returned image. Valid values: WHITE_BACKGROUND (White background image) and TRANSPARENT (Transparent background image). Required when the intelligent cutout capability is selected.
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* WHITE_BACKGROUND
|
|
@@ -23,7 +23,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
23
23
|
backGroundType?: string;
|
|
24
24
|
/**
|
|
25
25
|
* @remarks
|
|
26
|
-
* The glossary
|
|
26
|
+
* The ID of the intervention glossary. Optional. You must create the glossary in the console and provide its ID. If this parameter is left empty, the translation results are not modified.
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* glossary_1
|
|
@@ -31,7 +31,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
31
31
|
glossary?: string;
|
|
32
32
|
/**
|
|
33
33
|
* @remarks
|
|
34
|
-
* The URL of the image to
|
|
34
|
+
* The URL of the image to be processed. Required. The resolution must be greater than 256×256, the long side must not exceed 1920 pixels, and the short side must not exceed 1080 pixels. The size must not exceed 5 MB. Supported formats include PNG, JPEG, JPG, BMP, and WEBP.
|
|
35
35
|
*
|
|
36
36
|
* This parameter is required.
|
|
37
37
|
*
|
|
@@ -41,7 +41,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
41
41
|
imageUrl?: string;
|
|
42
42
|
/**
|
|
43
43
|
* @remarks
|
|
44
|
-
* Specifies whether to translate text on the image subject. Optional. Default value: false.
|
|
44
|
+
* Specifies whether to translate text on the image subject. Optional. Default value: false. This parameter helps protect embedded information such as product names from being translated.
|
|
45
45
|
*
|
|
46
46
|
* @example
|
|
47
47
|
* false
|
|
@@ -49,7 +49,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
49
49
|
includingProductArea?: boolean;
|
|
50
50
|
/**
|
|
51
51
|
* @remarks
|
|
52
|
-
* Specifies whether images with the
|
|
52
|
+
* Specifies whether to include images with the specified elements in subsequent processing. A value of true indicates that images with the elements are included in subsequent processing. A value of false indicates that images with the elements are not included. Required when the intelligent element recognition capability is selected.
|
|
53
53
|
*
|
|
54
54
|
* @example
|
|
55
55
|
* true
|
|
@@ -57,7 +57,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
57
57
|
isFilter?: boolean;
|
|
58
58
|
/**
|
|
59
59
|
* @remarks
|
|
60
|
-
* The specific
|
|
60
|
+
* The specific erasure area in Run-Length Encoding (RLE) format. Optional. If this parameter is specified, it takes precedence and the ObjectRemoveElements and NonobjectRemoveElements parameters are ignored.
|
|
61
61
|
*
|
|
62
62
|
* @example
|
|
63
63
|
* 474556 160 475356 160
|
|
@@ -65,7 +65,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
65
65
|
mask?: string;
|
|
66
66
|
/**
|
|
67
67
|
* @remarks
|
|
68
|
-
* The elements to detect on the non-subject area of the image
|
|
68
|
+
* The elements to detect on the non-subject area of the image. Multiple values are supported. Valid values: 1 (Watermark), 2 (Logo), 3 (Text), and 4 (Text block). When the intelligent element recognition capability is selected, at least one of this parameter and ObjectDetectElements must be specified.
|
|
69
69
|
*
|
|
70
70
|
* @example
|
|
71
71
|
* [1,2,3]
|
|
@@ -73,7 +73,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
73
73
|
nonobjectDetectElements?: number[];
|
|
74
74
|
/**
|
|
75
75
|
* @remarks
|
|
76
|
-
* The elements to remove from the non-subject area of the image
|
|
76
|
+
* The elements to remove from the non-subject area of the image. Multiple values are supported. Valid values: 1 (Transparent text block), 2 (Specific name), 3 (Text), and 4 (Cluttered text). When the intelligent erasure capability is selected, at least one of this parameter and ObjectRemoveElements must be specified.
|
|
77
77
|
*
|
|
78
78
|
* @example
|
|
79
79
|
* [1,2,4]
|
|
@@ -81,7 +81,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
81
81
|
nonobjectRemoveElements?: number[];
|
|
82
82
|
/**
|
|
83
83
|
* @remarks
|
|
84
|
-
* The elements to detect on the image subject
|
|
84
|
+
* The elements to detect on the image subject. Multiple values are supported. Valid values: 1 (Watermark), 2 (Logo), 3 (Text), and 4 (Text block). When the intelligent element recognition capability is selected, at least one of this parameter and NonobjectDetectElements must be specified.
|
|
85
85
|
*
|
|
86
86
|
* @example
|
|
87
87
|
* [1,2,3,4]
|
|
@@ -89,7 +89,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
89
89
|
objectDetectElements?: number[];
|
|
90
90
|
/**
|
|
91
91
|
* @remarks
|
|
92
|
-
* The elements to remove from the image subject
|
|
92
|
+
* The elements to remove from the image subject. Multiple values are supported. Valid values: 1 (Transparent text block), 2 (Specific name), 3 (Text), and 4 (Cluttered text). When the intelligent erasure capability is selected, at least one of this parameter and NonobjectRemoveElements must be specified.
|
|
93
93
|
*
|
|
94
94
|
* @example
|
|
95
95
|
* [1,2,4]
|
|
@@ -97,7 +97,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
97
97
|
objectRemoveElements?: number[];
|
|
98
98
|
/**
|
|
99
99
|
* @remarks
|
|
100
|
-
* The source language code. Optional. For supported language pairs,
|
|
100
|
+
* The source language code. Optional. For supported language pairs, see the list of supported translation languages.
|
|
101
101
|
*
|
|
102
102
|
* @example
|
|
103
103
|
* zh
|
|
@@ -105,7 +105,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
105
105
|
sourceLanguage?: string;
|
|
106
106
|
/**
|
|
107
107
|
* @remarks
|
|
108
|
-
* The
|
|
108
|
+
* The expected height of the cropped image, in pixels. Valid values: 100 to 5000. Required when the intelligent cropping capability is selected.
|
|
109
109
|
*
|
|
110
110
|
* @example
|
|
111
111
|
* 800
|
|
@@ -113,7 +113,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
113
113
|
targetHeight?: number;
|
|
114
114
|
/**
|
|
115
115
|
* @remarks
|
|
116
|
-
* The target language code. Optional. For supported language pairs,
|
|
116
|
+
* The target language code. Optional. For supported language pairs, see the list of supported translation languages.
|
|
117
117
|
*
|
|
118
118
|
* @example
|
|
119
119
|
* en
|
|
@@ -121,7 +121,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
121
121
|
targetLanguage?: string;
|
|
122
122
|
/**
|
|
123
123
|
* @remarks
|
|
124
|
-
* The
|
|
124
|
+
* The expected width of the cropped image, in pixels. Valid values: 100 to 5000. Required when the intelligent cropping capability is selected.
|
|
125
125
|
*
|
|
126
126
|
* @example
|
|
127
127
|
* 800
|
|
@@ -129,7 +129,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
129
129
|
targetWidth?: number;
|
|
130
130
|
/**
|
|
131
131
|
* @remarks
|
|
132
|
-
* Specifies whether to translate brand names in the image. Optional. Default value: false.
|
|
132
|
+
* Specifies whether to translate brand names in the image. Optional. Default value: false. This parameter helps protect brand name information from being translated.
|
|
133
133
|
*
|
|
134
134
|
* @example
|
|
135
135
|
* false
|
|
@@ -137,7 +137,7 @@ export class VisionFlowRequest extends $dara.Model {
|
|
|
137
137
|
translatingBrandInTheProduct?: boolean;
|
|
138
138
|
/**
|
|
139
139
|
* @remarks
|
|
140
|
-
* The image upscaling factor. Optional. Default value: 2. Valid values: 2 to 4.
|
|
140
|
+
* The image upscaling factor. Optional. Default value: 2. Valid values: 2 to 4. Required when the high-definition upscaling capability is selected.
|
|
141
141
|
*
|
|
142
142
|
* @example
|
|
143
143
|
* 2
|
|
@@ -5,7 +5,7 @@ import * as $dara from '@darabonba/typescript';
|
|
|
5
5
|
export class VisionFlowResponseBodyData extends $dara.Model {
|
|
6
6
|
/**
|
|
7
7
|
* @remarks
|
|
8
|
-
* The asynchronous task
|
|
8
|
+
* The ID of the asynchronous task, which is used to query the processing result by calling QueryAsyncTaskResult.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* e4c48e88-3c34-91e3-ab8a-08484dc4d402
|
|
@@ -35,7 +35,7 @@ export class VisionFlowResponseBodyData extends $dara.Model {
|
|
|
35
35
|
export class VisionFlowResponseBody extends $dara.Model {
|
|
36
36
|
/**
|
|
37
37
|
* @remarks
|
|
38
|
-
* The status code.
|
|
38
|
+
* The status code. If the call is successful, "success" is returned.
|
|
39
39
|
*
|
|
40
40
|
* @example
|
|
41
41
|
* success
|
|
@@ -43,12 +43,12 @@ export class VisionFlowResponseBody extends $dara.Model {
|
|
|
43
43
|
code?: string;
|
|
44
44
|
/**
|
|
45
45
|
* @remarks
|
|
46
|
-
* The
|
|
46
|
+
* The submission result data of the asynchronous task, which includes the asynchronous task ID.
|
|
47
47
|
*/
|
|
48
48
|
data?: VisionFlowResponseBodyData;
|
|
49
49
|
/**
|
|
50
50
|
* @remarks
|
|
51
|
-
* The error message.
|
|
51
|
+
* The error message. If the call is successful, "Success" is returned.
|
|
52
52
|
*
|
|
53
53
|
* @example
|
|
54
54
|
* Success
|
|
@@ -56,7 +56,7 @@ export class VisionFlowResponseBody extends $dara.Model {
|
|
|
56
56
|
message?: string;
|
|
57
57
|
/**
|
|
58
58
|
* @remarks
|
|
59
|
-
* The request ID, used to
|
|
59
|
+
* The request ID, which is used to identify a unique request.
|
|
60
60
|
*
|
|
61
61
|
* @example
|
|
62
62
|
* F3E65785-0180-1227-91B0-2F5F52F679FB
|
|
@@ -64,7 +64,7 @@ export class VisionFlowResponseBody extends $dara.Model {
|
|
|
64
64
|
requestId?: string;
|
|
65
65
|
/**
|
|
66
66
|
* @remarks
|
|
67
|
-
* Indicates whether the call is successful. A value of true indicates success
|
|
67
|
+
* Indicates whether the call is successful. A value of true indicates success, and a value of false indicates failure.
|
|
68
68
|
*
|
|
69
69
|
* @example
|
|
70
70
|
* true
|