From 1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 Mon Sep 17 00:00:00 2001 From: Zhineng Li Date: Sun, 12 Jul 2026 17:11:17 +0800 Subject: update APIs 20260712 --- data/en_us/imageenhan/2019-09-30/api-docs.php | 3897 ++++++++++++++----------- 1 file changed, 2250 insertions(+), 1647 deletions(-) (limited to 'data/en_us/imageenhan/2019-09-30') diff --git a/data/en_us/imageenhan/2019-09-30/api-docs.php b/data/en_us/imageenhan/2019-09-30/api-docs.php index 7187840..918c558 100644 --- a/data/en_us/imageenhan/2019-09-30/api-docs.php +++ b/data/en_us/imageenhan/2019-09-30/api-docs.php @@ -1,93 +1,40 @@ '1.0', - 'info' => [ - 'style' => 'RPC', - 'product' => 'imageenhan', - 'version' => '2019-09-30', - ], + 'info' => ['style' => 'RPC', 'product' => 'imageenhan', 'version' => '2019-09-30'], 'directories' => [ [ - 'id' => 64304, - 'title' => null, - 'type' => 'directory', - 'children' => [ - 'ImageBlindCharacterWatermark', - 'ImageBlindPicWatermark', - ], - ], - [ - 'id' => 64307, - 'title' => null, - 'type' => 'directory', - 'children' => [ - 'ExtendImageStyle', - 'RecolorHDImage', - 'RecolorImage', - ], - ], - [ - 'id' => 64311, - 'title' => null, + 'children' => ['ImageBlindCharacterWatermark', 'ImageBlindPicWatermark'], 'type' => 'directory', - 'children' => [ - 'ErasePerson', - 'RemoveImageSubtitles', - 'RemoveImageWatermark', - ], + 'title' => 'Watermark', ], [ - 'id' => 64315, - 'title' => null, + 'children' => ['ErasePerson', 'RemoveImageSubtitles', 'RemoveImageWatermark'], 'type' => 'directory', - 'children' => [ - 'AssessComposition', - 'AssessExposure', - 'AssessSharpness', - ], + 'title' => 'Erasure', ], [ - 'id' => 64319, - 'title' => null, + 'children' => ['AssessComposition', 'AssessExposure', 'AssessSharpness'], 'type' => 'directory', - 'children' => [ - 'ChangeImageSize', - 'ColorizeImage', - 'EnhanceImageColor', - 'ImitatePhotoStyle', - 'IntelligentComposition', - 'MakeSuperResolutionImage', - ], + 'title' => 'Scoring', ], [ - 'id' => 64327, - 'title' => null, + 'children' => ['ChangeImageSize', 'ColorizeImage', 'EnhanceImageColor', 'ImitatePhotoStyle', 'IntelligentComposition', 'MakeSuperResolutionImage'], 'type' => 'directory', - 'children' => [ - 'GetAsyncJobResult', - ], + 'title' => 'Other capabilities', ], [ - 'id' => 0, - 'title' => '其它', + 'children' => ['GenerateCartoonizedImage', 'GenerateSuperResolutionImage', 'GetAsyncJobResult'], + 'title' => 'Others', 'type' => 'directory', - 'children' => [ - 'GenerateCartoonizedImage', - 'GenerateSuperResolutionImage', - ], ], ], 'components' => [ 'schemas' => [], ], 'apis' => [ - 'ImageBlindCharacterWatermark' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'AssessComposition' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -98,136 +45,122 @@ 'systemTags' => [], 'parameters' => [ [ - 'name' => 'FunctionType', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'encode_text', - ], - ], - [ - 'name' => 'Text', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => '', - ], - ], - [ - 'name' => 'WatermarkImageURL', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'https://viapi-doc.oss-cn-shanghai.aliyuncs.com/imageenhan/xxxxx.jpg', - 'isFileTransferUrl' => true, - ], - ], - [ - 'name' => 'OutputFileType', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'jpg', - ], - ], - [ - 'name' => 'QualityFactor', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '100', - ], - ], - [ - 'name' => 'OriginImageURL', + 'name' => 'ImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', - 'isFileTransferUrl' => true, - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/AssessComposition/AssessComposition1.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'description' => '1', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'type' => 'string', - 'example' => '2457E1ED-9C76-4386-B9A2-7E41B7D6E849', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'CCAD9435-AEDB-49E4-BCCC-99B65ECC6693', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned result data.', 'type' => 'object', 'properties' => [ - 'WatermarkImageURL' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', - ], - 'TextImageURL' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', - ], + 'Score' => ['description' => 'The composition aesthetic score of the image. Valid values: 0 to 5. A higher score indicates better composition. A score of 3.8 or above is considered a good composition score.', 'type' => 'number', 'format' => 'float', 'example' => '4.2551436', 'title' => ''], ], + 'title' => '', + 'example' => '', ], ], + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"CCAD9435-AEDB-49E4-BCCC-99B65ECC6693\\",\\n \\"Data\\": {\\n \\"Score\\": 4.2551436\\n }\\n}","type":"json"}]', + 'title' => 'Image composition aesthetic scoring', + 'summary' => 'Describes the syntax and provides examples for the AssessComposition operation for image composition aesthetic scoring.', + 'description' => '## Feature description'."\n" + .'The image composition aesthetic scoring feature scores the composition aesthetics of an input image. A higher score indicates better composition.'."\n" + ."\n" + .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from online support.'."\n" + .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessComposition) to experience this feature or purchase it online.'."\n" + .'- For questions about API integration, usage, or consultation regarding the Alibaba Cloud Visual Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n" + ."\n" + .'## Integration guide'."\n" + .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete the registration.'."\n" + .'2. Activate the feature: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/AssessComposition?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FAssessComposition%2FAssessComposition1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find and install the SDK package for the Image Production (imageenhan) category in the corresponding SDK documentation.'."\n" + .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n" + ."\n" + .'6. Sample code: For sample code in commonly used languages, see [Image composition aesthetic scoring sample code](~~601518~~).'."\n" + ."\n" + .'7. Direct client calls: Common client call methods for this feature include the following.'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + .'- Image format: JPG, JPEG, BMP, PNG, or WEBP.'."\n" + .'- Image size: Less than 3 MB.'."\n" + .'- Image resolution: Must be greater than 32 × 32 pixels. There is no upper limit, but excessively large images may cause download timeouts.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For the billable methods and pricing of image composition aesthetic scoring, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The API operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessComposition). The debug operation below is a paid operation.', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'To use the image composition aesthetic scoring feature under the Visual AI Image Production category, we recommend that you call the operation by using an SDK. The SDK supports multiple programming languages. Select the SDK package for the Image Production (imageenhan) category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in commonly used languages, see [Image composition aesthetic scoring sample code](~~601518~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of image composition aesthetic scoring, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the experience debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-05-06T10:48:02.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessComposition'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:AssessComposition', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2457E1ED-9C76-4386-B9A2-7E41B7D6E849\\",\\n \\"Data\\": {\\n \\"WatermarkImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\",\\n \\"TextImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 2457E1ED-9C76-4386-B9A2-7E41B7D6E849\\n \\n http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\n http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', ], - 'ImageBlindPicWatermark' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'AssessExposure' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -238,239 +171,122 @@ 'systemTags' => [], 'parameters' => [ [ - 'name' => 'FunctionType', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'encode_pic', - 'required' => true, - 'type' => 'string', - ], - ], - [ - 'name' => 'LogoURL', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', - 'isFileTransferUrl' => true, - 'required' => false, - 'type' => 'string', - ], - ], - [ - 'name' => 'WatermarkImageURL', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'https://viapi-doc.oss-cn-shanghai.aliyuncs.com/imageenhan/xxxxx.jpg', - 'isFileTransferUrl' => true, - 'required' => false, - 'type' => 'string', - ], - ], - [ - 'name' => 'OutputFileType', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'jpg', - 'required' => false, - 'type' => 'string', - ], - ], - [ - 'name' => 'QualityFactor', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '100', - 'format' => 'int32', - 'required' => false, - 'type' => 'integer', - ], - ], - [ - 'name' => 'OriginImageURL', + 'name' => 'ImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', - 'isFileTransferUrl' => true, - 'required' => false, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/AssessExposure/AssessExposure1.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ 'description' => '1', + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => 'DE7869E4-0ACE-4C02-8B98-540B49F49205', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '4EF3C65B-C3CC-425B-AFB3-2FE6B98C578B', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', + 'type' => 'object', 'properties' => [ - 'WatermarkImageURL' => [ - 'description' => '', - 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', - 'type' => 'string', - ], - 'LogoURL' => [ - 'description' => '', - 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', - 'type' => 'string', - ], + 'Exposure' => ['description' => 'The image exposure score. Valid values: 0 to 1. A higher score indicates greater exposure.', 'type' => 'number', 'format' => 'float', 'example' => '0.1', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', - ], - ], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"DE7869E4-0ACE-4C02-8B98-540B49F49205\\",\\n \\"Data\\": {\\n \\"WatermarkImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\",\\n \\"LogoURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"DE7869E4-0ACE-4C02-8B98-540B49F49205\\n\\n http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\n http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\n","errorExample":""}]', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"4EF3C65B-C3CC-425B-AFB3-2FE6B98C578B\\",\\n \\"Data\\": {\\n \\"Exposure\\": 0.1\\n }\\n}","type":"json"}]', + 'title' => 'Image exposure scoring', + 'summary' => 'This topic describes the syntax and examples of the AssessExposure operation for image exposure scoring.', + 'description' => '## Description'."\n" + .'The image exposure scoring feature scores the exposure level of an input image. A higher score indicates greater exposure.'."\n" + ."\n" + .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from online support.'."\n" + .'- You can try the full product experience for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessExposure) to try this feature or purchase it online.'."\n" + .'- For questions about API integration, usage, or consultation regarding Alibaba Cloud Vision Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n" + ."\n" + .'## Getting started'."\n" + .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n" + .'2. Activate the service: Make sure you have activated the [Intelligent Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/AssessExposure?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FAssessExposure%2FAssessExposure1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the AI category Intelligent Image Production (imageenhan) in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the references as needed and invoke it.'."\n" + ."\n" + .'6. Sample code: For sample code in commonly used languages, see [AssessExposure sample code](~~601404~~).'."\n" + ."\n" + .'7. Direct client calls: Common client call methods for this feature include the following.'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + .'- Image format: JPG, JPEG, BMP, or PNG.'."\n" + .'- Image size: Less than 3 MB.'."\n" + .'- Image resolution: Must be greater than 32 × 32 pixels. There is no upper limit, but excessively large images may cause download timeouts.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For the billable methods and pricing of image exposure scoring, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging API below is a paid API. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessExposure).', 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', - ], - 'ExtendImageStyle' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [], - 'parameters' => [ - [ - 'name' => 'StyleUrl', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ExtendImageStyle/ExtendImageStyle6.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], - ], - [ - 'name' => 'MajorUrl', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ExtendImageStyle/ExtendImageStyle1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], - ], - ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => 'F1ABC965-2612-4680-9DE3-B5C77434B9B7', - 'type' => 'string', - ], - 'Data' => [ - 'description' => '', - 'properties' => [ - 'Url' => [ - 'description' => '', - 'example' => 'http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/result_/2019-9-26/invi__015694889247201016812_spCq4n.jpg?Expires=1569492524&OSSAccessKeyId=LTAI4Fc5SVvzUQ19K1Cz****&Signature=uOEP8gKvdgPtDcrXxRz1v37dsT****', - 'type' => 'string', - ], - 'MajorUrl' => [ - 'description' => '', - 'example' => '-', - 'type' => 'string', - ], - ], - 'type' => 'object', - ], + 'responseParamsDescription' => '## SDK reference'."\n" + .'For the image exposure scoring feature under the Alibaba Cloud Vision AI Intelligent Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the AI category Intelligent Image Production (imageenhan). File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in commonly used languages, see [AssessExposure sample code](~~601404~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of image exposure scoring, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-05-06T10:48:02.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessExposure'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:AssessExposure', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], - 'type' => 'object', ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], - ], - 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], - ], - 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], - ], - 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', - ], - ], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"F1ABC965-2612-4680-9DE3-B5C77434B9B7\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/result_/2019-9-26/invi__015694889247201016812_spCq4n.jpg?Expires=1569492524&OSSAccessKeyId=LTAI****************&Signature=uOEP8gKvdgPtDcrXxRz1v37dsT****\\",\\n \\"MajorUrl\\": \\"-\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n F1ABC965-2612-4680-9DE3-B5C77434B9B7\\n \\n http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/result_/2019-9-26/invi__015694889247201016812_spCq4n.jpg?Expires=1569492524&OSSAccessKeyId=LTAI****************&Signature=uOEP8gKvdgPtDcrXxRz1v37dsT****\\n -\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', ], - 'RecolorHDImage' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'AssessSharpness' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -481,163 +297,122 @@ 'systemTags' => [], 'parameters' => [ [ - 'name' => 'Url', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RecolorHDImage/RecolorHDImage-auto1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], - ], - [ - 'name' => 'Mode', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'REF_PIC', - 'required' => false, - 'type' => 'string', - 'default' => 'AUTO', - 'enum' => [ - 'AUTO', - 'TEMPLATE', - 'REF_PIC', - ], - ], - ], - [ - 'name' => 'RefUrl', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RecolorHDImage/RecolorHDImage-REF_PIC6.jpg', - 'isFileTransferUrl' => true, - 'required' => false, - 'type' => 'string', - ], - ], - [ - 'name' => 'ColorCount', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '2', - 'format' => 'int32', - 'maximum' => '8', - 'minimum' => '1', - 'required' => false, - 'type' => 'integer', - 'default' => '1', - ], - ], - [ - 'name' => 'Degree', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '0.4', - 'required' => true, - 'type' => 'string', - ], - ], - [ - 'name' => 'ColorTemplate', + 'name' => 'ImageURL', 'in' => 'formData', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '1', - 'items' => [ - 'properties' => [ - 'Color' => [ - 'description' => '', - 'example' => '[3F6A6B,0A0A6F]', - 'required' => false, - 'type' => 'string', - ], - ], - 'required' => false, - 'type' => 'object', - ], - 'maxItems' => 7, - 'required' => false, - 'type' => 'array', - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/AssessSharpness/AssessSharpness1.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'description' => '1', + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '9364CEB1-1C39-489F-B6DB-6E65577429F1', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'C0B594A1-383E-4F97-A740-0D51CF8E37D2', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', + 'type' => 'object', 'properties' => [ - 'ImageList' => [ - 'description' => '1', - 'items' => [ - 'description' => '', - 'example' => 'http://viapi-cn-shanghai-dha-filter.oss-cn-shanghai.aliyuncs.com/upload/recoloring-hd-2020-06-22-19-39-25-798c9cb57f-v6pj4/2020-6-23/invi_filter_015928996015951000042_EBPBLN.jpg?Expires=1592901401&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=ICWehJZ1tjpz6qDFVONv5%2Fyvbo****', - 'type' => 'string', - ], - 'type' => 'array', - ], + 'Sharpness' => ['description' => 'The sharpness score of the image. Valid values: 0 to 1. A higher score indicates a clearer image.', 'type' => 'number', 'format' => 'float', 'example' => '0.1', 'title' => ''], ], - 'type' => 'object', - ], - 'Message' => [ - 'description' => '', + 'title' => '', 'example' => '', - 'type' => 'string', ], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"C0B594A1-383E-4F97-A740-0D51CF8E37D2\\",\\n \\"Data\\": {\\n \\"Sharpness\\": 0.1\\n }\\n}","type":"json"}]', + 'title' => 'Image sharpness scoring', + 'summary' => 'This topic describes the syntax and examples of the image sharpness scoring feature (AssessSharpness).', + 'description' => '## Feature description'."\n" + .'The image sharpness scoring feature scores the sharpness of an input image. A higher score indicates a clearer image.'."\n" + ."\n" + .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n" + .'- You can try the full product experience for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessSharpness) to try this feature or purchase it online.'."\n" + .'- For questions about API integration or usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Integration guide'."\n" + .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n" + .'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/AssessSharpness?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FAssessSharpness%2FAssessSharpness1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the References as needed and invoke it.'."\n" + ."\n" + .'6. Sample code: For sample code in commonly used languages, see [Image sharpness scoring sample code](~~601409~~).'."\n" + ."\n" + .'7. Direct client calls: Common client call methods for this feature include the following.'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + .'- Image format: JPG, JPEG, BMP, or PNG.'."\n" + .'- Image size: Less than 3 MB.'."\n" + .'- Image resolution: Must be greater than 32 × 32 pixels. There is no upper limit, but excessively large images may cause download timeouts.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For the billable methods and pricing of image sharpness scoring, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging API below is a paid API. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=AssessSharpness).', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'For the image sharpness scoring feature under the Alibaba Cloud Visual AI Image Production category, we recommend using the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the Image Production (imageenhan) AI category. File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in commonly used languages, see [Image sharpness scoring sample code](~~601409~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of image sharpness scoring, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2021-06-22T08:16:40.000Z', 'description' => 'OpenAPI offline'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessSharpness'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:AssessSharpness', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"9364CEB1-1C39-489F-B6DB-6E65577429F1\\",\\n \\"Data\\": {\\n \\"ImageList\\": [\\n \\"http://viapi-cn-shanghai-dha-filter.oss-cn-shanghai.aliyuncs.com/upload/recoloring-hd-2020-06-22-19-39-25-798c9cb57f-v6pj4/2020-6-23/invi_filter_015928996015951000042_EBPBLN.jpg?Expires=1592901401&OSSAccessKeyId=LTAI****************&Signature=ICWehJZ1tjpz6qDFVONv5%2Fyvbo****\\"\\n ]\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 9364CEB1-1C39-489F-B6DB-6E65577429F1\\n 该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\n","errorExample":""}]', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', ], - 'RecolorImage' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ChangeImageSize' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -645,150 +420,150 @@ ], 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [], + 'systemTags' => ['operationType' => 'update'], 'parameters' => [ [ - 'name' => 'Url', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RecolorImage/RecolorImage-REF_PIC1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], - ], - [ - 'name' => 'Mode', + 'name' => 'Width', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'TEMPLATE', - 'required' => false, - 'type' => 'string', - 'default' => 'AUTO', - 'enum' => [ - 'AUTO', - 'TEMPLATE', - 'REF_PIC', - ], - ], + 'schema' => ['description' => 'The target width. Unit: pixels.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '2000', 'minimum' => '10', 'example' => '800', 'title' => ''], ], [ - 'name' => 'RefUrl', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RecolorImage/RecolorImage-REF_PIC7.jpg', - 'isFileTransferUrl' => true, - 'required' => false, - 'type' => 'string', - ], - ], - [ - 'name' => 'ColorCount', + 'name' => 'Height', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '3', - 'format' => 'int32', - 'maximum' => '8', - 'minimum' => '1', - 'required' => false, - 'type' => 'integer', - 'default' => '1', - ], + 'schema' => ['description' => 'The target height. Unit: pixels.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '2000', 'minimum' => '10', 'example' => '600', 'title' => ''], ], [ - 'name' => 'ColorTemplate', + 'name' => 'Url', 'in' => 'formData', - 'style' => 'repeatList', - 'schema' => [ - 'description' => '1', - 'items' => [ - 'properties' => [ - 'Color' => [ - 'description' => '', - 'example' => '056A6B', - 'required' => false, - 'type' => 'string', - ], - ], - 'required' => false, - 'type' => 'object', - ], - 'maxItems' => 7, - 'required' => false, - 'type' => 'array', - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ChangeImageSize/ChangeImageSize5.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '3A9BFC5E-3F7C-4D9A-9445-908C6D14AB5B', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2833446F-A431-40EB-A502-6EC9DFEEEEB0', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned result data.', + 'type' => 'object', 'properties' => [ - 'ImageList' => [ - 'description' => '1', - 'items' => [ - 'description' => '', - 'example' => 'http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/RecolorImage/recolor-1-src.png?Expires=1574600624&OSSAccessKeyId=LTAI4FeJ8qKkYn6SrHhQ****&Signature=y6MqVvFjrV9lnmhcCHZSulXOc2****', - 'type' => 'string', + 'Url' => ['description' => 'The URL of the resized image.'."\n" + .'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/result_filter/2019-11-21/invi_filter_015743271470661000112_NVKmET.png?Expires=1574586347&OSSAccessKeyId=LTAI4FeJ8qKkYn6SrHhQ****&Signature=QqRAiqvyXsVlZ77M8yFc5QKJDE****', 'title' => ''], + 'RetainLocation' => [ + 'description' => 'The coordinate information of the original image data in the generated image.', + 'type' => 'object', + 'properties' => [ + 'Width' => ['description' => 'The width of the original image after proportional scaling based on the specified width. Unit: pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '298', 'title' => ''], + 'Height' => ['description' => 'The height of the original image after proportional scaling based on the specified height. Unit: pixels.', 'type' => 'integer', 'format' => 'int32', 'example' => '224', 'title' => ''], + 'Y' => ['description' => 'The y-coordinate of the upper-left corner of the original image.', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''], + 'X' => ['description' => 'The x-coordinate of the upper-left corner of the original image.', 'type' => 'integer', 'format' => 'int32', 'example' => '0', 'title' => ''], ], - 'type' => 'array', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2833446F-A431-40EB-A502-6EC9DFEEEEB0\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/result_filter/2019-11-21/invi_filter_015743271470661000112_NVKmET.png?Expires=1574586347&OSSAccessKeyId=LTAI4FeJ8qKkYn6SrHhQ****&Signature=QqRAiqvyXsVlZ77M8yFc5QKJDE****\\",\\n \\"RetainLocation\\": {\\n \\"Width\\": 298,\\n \\"Height\\": 224,\\n \\"Y\\": 0,\\n \\"X\\": 0\\n }\\n }\\n}","type":"json"}]', + 'title' => 'Image cropping', + 'summary' => 'This topic describes the syntax and examples of the image cropping feature ChangeImageSize.', + 'description' => '## Feature description'."\n" + .'The image cropping feature can transform an input image to specified dimensions. It supports automatic detection of the subject area position and uses an optimal cropping method to crop the image.'."\n" + ."\n" + .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n" + .'- You can try the full product experience for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ChangeImageSize) to try this feature or purchase it online.'."\n" + .'- For questions about API integration, usage, or consultation regarding the Alibaba Cloud Vision Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n" + ."\n" + .'## Integration guide'."\n" + .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n" + .'2. Activate the service: Make sure you have activated [Intelligent Image Production](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ChangeImageSize?lang=JAVA&sdkStyle=dara¶ms=%7B%22Url%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FChangeImageSize%2FChangeImageSize1.jpg%22%2C%22Width%22%3A612%2C%22Height%22%3A344%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the AI category Intelligent Image Production (imageenhan) in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the References as needed and invoke it.'."\n" + ."\n" + .'6. Sample code: For sample code in commonly used languages, see [Image cropping sample code](~~601512~~).'."\n" + ."\n" + .'7. Direct client calls: Common client call methods for this feature include the following.'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + ."\n" + .'- Image format: JPEG, JPG, PNG, BMP, or WEBP.'."\n" + .'- Image size: up to 3.5 MB.'."\n" + .'- Image resolution: The content image and style image must not exceed 2000 × 2000 pixels.'."\n" + .'- Images must be in RGB 3-channel format.'."\n" + .'- The URL must not contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For the billable methods and pricing of image cropping, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging interface below is a paid interface. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ChangeImageSize).', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'For the image cropping feature under the Alibaba Cloud Vision AI Intelligent Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the AI category Intelligent Image Production (imageenhan). File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in commonly used languages, see [Image cropping sample code](~~601512~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of image cropping, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-05-06T10:48:02.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeImageSize'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ChangeImageSize', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"3A9BFC5E-3F7C-4D9A-9445-908C6D14AB5B\\",\\n \\"Data\\": {\\n \\"ImageList\\": [\\n \\"http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/RecolorImage/recolor-1-src.png?Expires=1574600624&OSSAccessKeyId=LTAI****************&Signature=y6MqVvFjrV9lnmhcCHZSulXOc2****\\"\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"自动拓色\\n\\n \\n http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/RecolorImage/recolor-1-src.png?Expires=1574600624&OSSAccessKeyId=LTAI****************&Signature=y6MqVvFjrV9lnmhcCHZSulXOc2****\\n \\n 77D09611-9FBC-406E-8506-405C468F310B\\n\\n参考图拓色\\n\\n \\n http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/result_/2019-11-21/invi__015743415515071000118_nBp2Ej.png?Expires=1574600751&OSSAccessKeyId=LTAI****************&Signature=rMwWX2dRlosApH3A3DSjxwVaFK****\\n \\n 4299F194-6F92-4939-BCD8-02FDD9EF790C\\n\\n色板拓色\\n\\n \\n http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/result_/2019-11-21/invi__015743416356921000120_bnAO7l.png?Expires=1574600835&OSSAccessKeyId=LTAI****************&Signature=XurCY8jIvhpT58INfe8eJ7psVS****\\n \\n 3A9BFC5E-3F7C-4D9A-9445-908C6D14AB5B\\n","errorExample":""}]', ], - 'ErasePerson' => [ - 'methods' => [ - 'post', - 'get', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ColorizeImage' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -801,99 +576,136 @@ [ 'name' => 'ImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ErasePerson/ErasePerson1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], - ], - [ - 'name' => 'UserMask', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ErasePerson/ErasePerson6.jpg', - 'required' => true, - 'type' => 'string', - 'isFileTransferUrl' => true, - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ColorizeImage/ColorizeImage1.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '2FEDA495-9A5D-48B5-8922-98A4FE01D381', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '124A4B09-68EF-4178-B98D-319089D4268B', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', + 'type' => 'object', 'properties' => [ - 'ImageUrl' => [ - 'description' => '', - 'example' => 'http://algo-app-isr-lab-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/remove-person/2020-10-29_10%3A59%3A21.421276_img19.png?Expires=1603970961&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=9lBakx0r6FOssTEYTcKs5pk8ta****', - 'type' => 'string', - ], + 'ImageURL' => ['description' => 'The URL of the processed image.'."\n" + .'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To store the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-aic-vc-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/face-enhancement/2020_11_26/20201126_182812286268_079260.jpg?Expires=1606388292&OSSAccessKeyId=LTAI****************&Signature=f71Bx37g%2BGhM%2B6FOXM0EbNL8W4****', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], - [ - 'errorCode' => 'NeedOpen', - 'errorMessage' => 'Please activate the service first.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], - ], - 500 => [ - [ - 'errorCode' => 'InternalServerError', - 'errorMessage' => 'A server error occurred while processing your request.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"124A4B09-68EF-4178-B98D-319089D4268B\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vc-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/face-enhancement/2020_11_26/20201126_182812286268_079260.jpg?Expires=1606388292&OSSAccessKeyId=LTAI****************&Signature=f71Bx37g%2BGhM%2B6FOXM0EbNL8W4****\\"\\n }\\n}","type":"json"}]', + 'title' => 'Colorize images', + 'summary' => 'This topic describes the syntax and provides examples of the ColorizeImage operation.', + 'description' => '## Description'."\n" + .'The image colorization feature automatically colorizes black-and-white photos and images.'."\n" + .'The following figures show examples of this operation:'."\n" + ."\n" + .'- Black-and-white image:'."\n" + .'![Black-and-white image](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/wxfw/ColorizeImage.jpg" width="500)'."\n" + .'- Processed image:'."\n" + .'![Processed image](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/roff/ColorizeImagecaise.png" width="500)'."\n" + ."\n\n" + .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n" + .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ColorizeImage) to experience this feature or purchase it online.'."\n" + .'- To consult about API integration, usage, or issues related to Alibaba Cloud Vision Intelligence Open Platform, contact us by joining the DingTalk group (23109592).'."\n" + ."\n" + .'## Common scenarios'."\n" + ."\n" + .'- Old black-and-white photo revert: Black-and-white photos taken in the last century can be automatically converted to color photos by using the image colorization feature.'."\n" + .'- Automatic painting colorization: Paintings and graphic designs can be automatically colorized by using the image colorization feature, which accelerates the production process.'."\n" + ."\n" + .'## Features'."\n" + ."\n" + .'- Realistic restoration: Realistically restores the original colors of the scene captured in the photo.'."\n" + .'- Suitable for various scenarios: Suitable for various shooting scenarios such as portraits, landscapes, and street views.'."\n" + ."\n" + .'## Integration guide'."\n" + .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n" + .'2. Activate the service: Make sure that you have activated [Intelligent Visual Production](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ColorizeImage?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FColorizeImage%2FColorizeImage1.jpg%22%7D&tab=DEMO) to debug this operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the Intelligent Visual Production (imageenhan) category in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n" + ."\n" + .'6. Sample code: For sample code in commonly used languages, see [ColorizeImage sample code](~~480089~~).'."\n" + ."\n" + .'7. Direct client calls: Common client-side calling methods for this feature include the following.'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + ."\n" + .'- Image format: JPG, JPEG, BMP, or PNG.'."\n" + .'- Image size: up to 10 MB.'."\n" + .'- Image resolution: less than 3000 × 3000 pixels.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For information about the billable methods and pricing of image colorization, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging operation below is a paid operation. To try it for free, go to [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ColorizeImage).', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'To use the image colorization feature of Alibaba Cloud Vision AI Intelligent Visual Production, we recommend that you call the operation by using an SDK. SDKs for multiple programming languages are supported. Select the SDK package for the Intelligent Visual Production (imageenhan) category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in commonly used languages, see [ColorizeImage sample code](~~480089~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of image colorization, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ColorizeImage'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ColorizeImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2FEDA495-9A5D-48B5-8922-98A4FE01D381\\",\\n \\"Data\\": {\\n \\"ImageUrl\\": \\"http://algo-app-isr-lab-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/remove-person/2020-10-29_10%3A59%3A21.421276_img19.png?Expires=1603970961&OSSAccessKeyId=LTAI****************&Signature=9lBakx0r6FOssTEYTcKs5pk8ta****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 2FEDA495-9A5D-48B5-8922-98A4FE01D381\\n \\n http://algo-app-isr-lab-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/remove-person/2020-10-29_10%3A59%3A21.421276_img19.png?Expires=1603970961&OSSAccessKeyId=LTAI****************&Signature=9lBakx0r6FOssTEYTcKs5pk8ta****\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', ], - 'RemoveImageSubtitles' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'EnhanceImageColor' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -906,204 +718,155 @@ [ 'name' => 'ImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RemoveImageSubtitles/RemoveImageSubtitles1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n" + .'Input limits:'."\n" + ."\n" + .'- Image format: JPG, PNG, or BMP.'."\n" + .'- Image size: Less than 3 MB.'."\n" + .'- Image resolution: Greater than 64 × 64 pixels and less than 3840 × 2160 pixels. The shortest side must be less than 2160 pixels and the longest side must be less than 3840 pixels.'."\n" + .'- The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/EnhanceImageColor/EnhanceImageColor1.jpg', 'title' => ''], ], [ - 'name' => 'BX', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '0', - 'format' => 'float', - 'required' => false, - 'type' => 'number', - ], - ], - [ - 'name' => 'BY', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '0.75', - 'format' => 'float', - 'required' => false, - 'type' => 'number', - ], - ], - [ - 'name' => 'BW', + 'name' => 'OutputFormat', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '1', - 'format' => 'float', - 'required' => false, - 'type' => 'number', - ], + 'schema' => ['description' => 'The format of the output image. Valid values: `png`, `jpg`, and `bmp`.', 'type' => 'string', 'required' => true, 'example' => 'png', 'title' => ''], ], [ - 'name' => 'BH', + 'name' => 'Mode', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '0.25', - 'format' => 'float', - 'required' => false, - 'type' => 'number', - ], + 'schema' => ['description' => 'The rendering intent mode. Valid values: LogC, Rec709, and ln17_256.'."\n" + ."\n" + .'- LogC: suitable for gray footage (low-contrast raw images) input. Significantly adjusts the image color appearance to restore SDR-domain color quality.'."\n" + .'- Rec709: suitable for images captured under normal conditions. Moderately enhances image brightness and saturation with conservative adjustments.'."\n" + .'- ln17_256: suitable for images captured under normal conditions. Significantly adjusts image brightness, saturation, and contrast to enhance color quality.', 'type' => 'string', 'required' => true, 'example' => 'LogC', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '939B2103-EE28-4F2D-9773-9A37AD00E5B7', - 'type' => 'string', - ], - 'Data' => [ - 'description' => '', - 'properties' => [ - 'ImageURL' => [ - 'description' => '', - 'example' => 'http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-desubtitle/2020-03-23-08/02%3A50-e8af2ea3-bddc-4ec8-b21c-493ee687465e.jpg?Expires=1584952370&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=qVnfWZJ2QtI9NRWQ410FsEFioq****', - 'type' => 'string', - ], - ], - 'type' => 'object', - ], - ], 'type' => 'object', - ], - ], - ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], - ], - 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], - ], - 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], - ], - 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', - ], - ], - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"939B2103-EE28-4F2D-9773-9A37AD00E5B7\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-desubtitle/2020-03-23-08/02%3A50-e8af2ea3-bddc-4ec8-b21c-493ee687465e.jpg?Expires=1584952370&OSSAccessKeyId=LTAI****************&Signature=qVnfWZJ2QtI9NRWQ410FsEFioq****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 939B2103-EE28-4F2D-9773-9A37AD00E5B7\\n \\n http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-desubtitle/2020-03-23-08/02%3A50-e8af2ea3-bddc-4ec8-b21c-493ee687465e.jpg?Expires=1584952370&OSSAccessKeyId=LTAI****************&Signature=qVnfWZJ2QtI9NRWQ410FsEFioq****\\n \\n","errorExample":""}]', - ], - 'RemoveImageWatermark' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], - 'security' => [ - [ - 'AK' => [], - ], - ], - 'operationType' => 'readAndWrite', - 'deprecated' => false, - 'systemTags' => [], - 'parameters' => [ - [ - 'name' => 'ImageURL', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RemoveImageWatermark/RemoveImageWatermark3.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], - ], - ], - 'responses' => [ - 200 => [ - 'schema' => [ 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '885070A7-E721-4062-99A0-80C0EBBF9406', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2F306ABD-5BC3-4FA0-89CF-0DED5B3654EB', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', + 'type' => 'object', 'properties' => [ - 'ImageURL' => [ - 'description' => '', - 'example' => 'http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-delogo/2020-03-27-03/00%3A06-5a6f0a0f-c940-4955-af75-79e8267f1699.jpg?Expires=1585279806&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=R4OC2R5%2Fkw08XYFXmCWjgk7Y9N****', - 'type' => 'string', - ], + 'ImageURL' => ['description' => 'The URL of the processed image.'."\n" + .'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-recolor/2020-06-23-10/24%3A14-3cf26e84-a5d2-49b0-8332-0e139e20c49e.png?Expires=1592909654&OSSAccessKeyId=LTAI****************&Signature=fHrYvitvm0qZJ9nrWYa%2Fjd4pQS****', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2F306ABD-5BC3-4FA0-89CF-0DED5B3654EB\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-recolor/2020-06-23-10/24%3A14-3cf26e84-a5d2-49b0-8332-0e139e20c49e.png?Expires=1592909654&OSSAccessKeyId=LTAI****************&Signature=fHrYvitvm0qZJ9nrWYa%2Fjd4pQS****\\"\\n }\\n}","type":"json"}]', + 'title' => 'Image color enhancement', + 'summary' => 'This topic describes the syntax and provides examples of the EnhanceImageColor operation.', + 'description' => '## Feature description'."\n" + .'The image color enhancement feature intelligently analyzes the content of an input image, automatically adjusts parameters based on the image content, optimizes multiple dimensions such as saturation, brightness, and contrast, and outputs the enhanced image.'."\n" + .'The following figures show examples of this operation:'."\n" + .'- Input image:'."\n" + .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221111/zguq/EnhanceImageColor.png" width="300)'."\n" + .'- Output enhanced image:'."\n" + .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221111/zqik/EnhanceImageColorzengqiang.png" width="300)'."\n" + ."\n" + .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n" + .'- You can try the full product experience for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=EnhanceImageColor) to try this feature or purchase it online.'."\n" + .'- To learn more about API access, usage, or consultation for Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Common scenarios'."\n" + .'- Design material enhancement: Intelligently analyzes and enhances design images for creative design purposes.'."\n" + .'- Photo enhancement: Intelligently enhances photos for sharing and distribution.'."\n" + ."\n" + .'## Advantages'."\n" + .'- High quality: Enhances image color across multiple dimensions such as saturation, exposure, and contrast for better visual results.'."\n" + .'- Adaptive enhancement: Automatically selects appropriate processing parameters through scene recognition and content analysis.'."\n" + ."\n" + .'## Getting started'."\n" + .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to create an account.'."\n" + .'2. Activate the service: Make sure you have activated the [Intelligent Visual Production](https://vision.aliyun.com/imageenhan) service. If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/EnhanceImageColor?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FEnhanceImageColor%2FEnhanceImageColor1.jpg%22%2C%22Mode%22%3A%22LogC%22%2C%22OutputFormat%22%3A%22png%22%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development and integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the Intelligent Visual Production (imageenhan) category in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n" + ."\n" + .'6. Sample code: For sample code in commonly used languages, see [EnhanceImageColor sample code](~~601517~~).'."\n" + ."\n" + .'7. Direct client calls: Common client call methods for this feature include the following:'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + ."\n" + .'- Image format: JPG, PNG, or BMP.'."\n" + .'- Image size: Less than 3 MB.'."\n" + .'- Image resolution: Greater than 64 × 64 pixels and less than 3840 × 2160 pixels. The shortest side must be less than 2160 pixels and the longest side must be less than 3840 pixels.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billable methods'."\n" + .'For information about the billable methods and pricing of image color enhancement, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=EnhanceImageColor).', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'We recommend that you use an SDK to call the image color enhancement feature under the Alibaba Cloud Vision AI Intelligent Visual Production category. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the Intelligent Visual Production (imageenhan) category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in commonly used languages, see [EnhanceImageColor sample code](~~601517~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of image color enhancement, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'EnhanceImageColor'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:EnhanceImageColor', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"885070A7-E721-4062-99A0-80C0EBBF9406\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-delogo/2020-03-27-03/00%3A06-5a6f0a0f-c940-4955-af75-79e8267f1699.jpg?Expires=1585279806&OSSAccessKeyId=LTAI****************&Signature=R4OC2R5%2Fkw08XYFXmCWjgk7Y9N****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 885070A7-E721-4062-99A0-80C0EBBF9406\\n \\n http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-delogo/2020-03-27-03/00%3A06-5a6f0a0f-c940-4955-af75-79e8267f1699.jpg?Expires=1585279806&OSSAccessKeyId=LTAI****************&Signature=R4OC2R5%2Fkw08XYFXmCWjgk7Y9N****\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', ], - 'AssessComposition' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ErasePerson' => [ + 'methods' => ['post', 'get'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1116,393 +879,620 @@ [ 'name' => 'ImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/AssessComposition/AssessComposition1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing (generate a URL by using the explicit viapiutils scheme)](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ErasePerson/ErasePerson1.jpg', 'title' => ''], + ], + [ + 'name' => 'UserMask', + 'in' => 'formData', + 'schema' => ['description' => 'The URL of the mask image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing (generate a URL by using the explicit viapiutils scheme)](~~155645~~).'."\n" + ."\n" + .'>The mask image is an RGB 3-channel image, not an alpha channel transparent image.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ErasePerson/ErasePerson6.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'description' => '1', + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => 'CCAD9435-AEDB-49E4-BCCC-99B65ECC6693', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2FEDA495-9A5D-48B5-8922-98A4FE01D381', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned result data.', + 'type' => 'object', 'properties' => [ - 'Score' => [ - 'description' => '', - 'example' => '4.2551436', - 'format' => 'float', - 'type' => 'number', - ], + 'ImageUrl' => ['description' => 'The URL of the output image.'."\n" + .'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, you can no longer access it. To store the file for an extended period of time or permanently, access the URL within 30 minutes, download the file, and then save it to your OSS bucket or another storage location.', 'type' => 'string', 'example' => 'http://algo-app-isr-lab-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/remove-person/2020-10-29_10%3A59%3A21.421276_img19.png?Expires=1603970961&OSSAccessKeyId=LTAI****************&Signature=9lBakx0r6FOssTEYTcKs5pk8ta****', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], + ['errorCode' => 'NeedOpen', 'errorMessage' => 'Please activate the service first.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], + ], + 500 => [ + ['errorCode' => 'InternalServerError', 'errorMessage' => 'A server error occurred while processing your request.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2FEDA495-9A5D-48B5-8922-98A4FE01D381\\",\\n \\"Data\\": {\\n \\"ImageUrl\\": \\"http://algo-app-isr-lab-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/remove-person/2020-10-29_10%3A59%3A21.421276_img19.png?Expires=1603970961&OSSAccessKeyId=LTAI****************&Signature=9lBakx0r6FOssTEYTcKs5pk8ta****\\"\\n }\\n}","type":"json"}]', + 'title' => 'Erase human figures from images', + 'summary' => 'This topic describes the syntax and examples of the ErasePerson feature for erasing human figures from images.', + 'description' => '## Feature description'."\n" + .'The image human figure erasure feature can erase human figures from specified regions in an image and automatically fill in the background.'."\n" + ."\n" + .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n" + .'- To inquire about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration, usage, or other questions, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Common scenarios'."\n" + ."\n" + .'- Travel photo restoration: The image human figure erasure feature helps you remove passersby from the background to restore your travel photos.'."\n" + .'- Post-production fix for unwanted appearances: During the film and television production procedure, if a person who should not appear is captured in a shot, the image human figure erasure feature can help you batch-process and fix these shots.'."\n" + ."\n" + .'## Advantages'."\n" + ."\n" + .'- Preserve original photo content as much as possible: By specifying a region mask, the automatic background fill range is narrowed to erase background figures and reduce visual inconsistency in the processed photo. For the human figure region mask, use the human body segmentation algorithm provided by Alibaba Cloud Vision Intelligence Open Platform for better results.'."\n" + .'- Automatically generate and fill backgrounds occluded by human figures: Based on deep learning algorithms, the image human figure erasure feature can infer and restore background content occluded by human figures, producing realistic results without visual inconsistency.'."\n" + ."\n" + .'## Getting started'."\n" + .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China Site Registration** in the upper-right corner, and follow the on-screen instructions to complete account registration.'."\n" + .'2. Activate the service: Make sure you have activated [Intelligent Image Production](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Debug online (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ErasePerson?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FErasePerson%2FErasePerson1.jpg%22%2C%22UserMask%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FErasePerson%2FErasePerson6.jpg%22%7D&tab=DEMO) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [Overview](~~145033~~).'."\n" + .'- Find the SDK package for the AI category Intelligent Image Production (imageenhan) in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the References as needed and invoke the API.'."\n" + ."\n" + .'6. Direct invocation from clients: Common client invocation methods for this feature include the following.'."\n" + .'- [Direct invocation from a frontend web application](~~467779~~)'."\n" + .'- [Direct invocation from a mini program](~~467780~~)'."\n" + .'- [Direct invocation from Android](~~467781~~)'."\n" + .'- [Direct invocation from iOS](~~467782~~)'."\n" + ."\n" + .'## Input limits'."\n" + ."\n" + .'- Image format: JPG, JPEG, BMP, PNG, WEBP, and TIF.'."\n" + .'- Image size: up to 3 MB.'."\n" + .'- Image resolution: greater than 5 × 5 pixels and less than 2048 × 2048 pixels.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + .'- The specified region in the image should closely fit the human figure and can be represented by a rectangle, polygon, or irregular area. The area to be erased cannot exceed 25% of the total image area.'."\n" + ."\n" + .'## Billing description'."\n" + .'For information about the billable methods and pricing of the image human figure erasure feature, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The following debug API operation is a paid API operation.', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'For the image human figure erasure feature under the Alibaba Cloud Vision AI Intelligent Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When you invoke the SDK, select the SDK package for the AI category Intelligent Image Production (imageenhan). File parameters can be passed as local files or URLs of any origin through the SDK. For more information, see [Overview](~~145033~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of the image human figure erasure feature, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debug feature are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-12-09T07:25:57.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ErasePerson'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ErasePerson', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"CCAD9435-AEDB-49E4-BCCC-99B65ECC6693\\",\\n \\"Data\\": {\\n \\"Score\\": 4.2551436\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n CCAD9435-AEDB-49E4-BCCC-99B65ECC6693\\n \\n 4.2551436\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', ], - 'AssessExposure' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GenerateCartoonizedImage' => [ + 'summary' => 'This topic describes the syntax and provides examples of the GenerateCartoonizedImage operation in the image production (imageenhan) category.', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [], 'parameters' => [ [ - 'name' => 'ImageURL', + 'name' => 'ImageUrl', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/AssessExposure/AssessExposure1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the input image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', 'title' => ''], + ], + [ + 'name' => 'ImageType', + 'in' => 'formData', + 'schema' => ['description' => 'This field is deprecated.', 'type' => 'string', 'required' => false, 'example' => 'null', 'title' => ''], + ], + [ + 'name' => 'Index', + 'in' => 'formData', + 'schema' => ['description' => 'The cartoon effect. Valid values:'."\n" + .'- 0: retro comic (default)'."\n" + .'- 1: 3D fairy tale'."\n" + .'- 2: anime'."\n" + .'- 3: fresh and clean'."\n" + .'- 4: futuristic tech'."\n" + .'- 5: traditional Chinese painting'."\n" + .'- 6: battle general'."\n" + .'- 7: colorful cartoon'."\n" + .'- 8: elegant Chinese.', 'type' => 'string', 'required' => true, 'example' => '0', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'description' => '1', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '4EF3C65B-C3CC-425B-AFB3-2FE6B98C578B', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '48f38719-f0c2-4784-a9cc-30df95e393a9', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned result data. After the asynchronous task is executed successfully, call the [GetAsyncJobResult](~~607824~~) operation and perform JSON deserialization on the Result field to obtain this data.', + 'type' => 'object', 'properties' => [ - 'Exposure' => [ - 'description' => '', - 'example' => '0.1', - 'format' => 'float', - 'type' => 'number', - ], + 'ResultUrl' => ['description' => 'The URL of the output image.'."\n" + ."\n" + .'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/generative-cartoon/2023-02-02/5a3e5760-ff27-4321-8976-d05656fb716a/20230202_154009511910_pclb0gomva.jpg?Expires=1675325422&OSSAccessKeyId=LTAI****************&Signature=UmAa7HxeumVkDfrdoL02dtztwS****', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], + 'Message' => ['description' => 'The message returned after the asynchronous task is submitted.', 'type' => 'string', 'example' => '该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。', 'title' => ''], ], - 'type' => 'object', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"48f38719-f0c2-4784-a9cc-30df95e393a9\\",\\n \\"Data\\": {\\n \\"ResultUrl\\": \\"http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/generative-cartoon/2023-02-02/5a3e5760-ff27-4321-8976-d05656fb716a/20230202_154009511910_pclb0gomva.jpg?Expires=1675325422&OSSAccessKeyId=LTAI****************&Signature=UmAa7HxeumVkDfrdoL02dtztwS****\\"\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","type":"json"}]', + 'title' => 'Generative image cartoonization', + 'description' => '## Feature description'."\n" + .'Generates images in various effect styles based on a generative foundation model. Provide an input image and select the desired cartoonization style to generate a cartoonized image with the same resolution as the input image in the specified style.'."\n" + .'The following figure shows the feature (the left image is the original, and the right image is the processed result):'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/rfpk/GenerateCartoonizedImagezonglan.png" width="600)'."\n" + .'The following describes each style in detail (the left image is the original, and the right image is the processed result):'."\n" + ."\n" + .'- Retro comic style'."\n" + .'This style simulates the retro comic style of the 1980s and 1990s. It can stylize various real-world scenes into comic style, including people, animals, landscapes, and furniture. The overall style features clear lines and vivid colors.'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/iyrz/GenerateCartoonizedImagefugu.png" width="600)'."\n" + ."\n" + .'- 3D fairy tale style'."\n" + .'This style simulates a 3D fairy tale look. It can stylize various real-world scenes into 3D animation style, including people, animals, landscapes, and furniture. The overall style is soft and elegant. This style preserves most features of the original image while generating new elements for added creativity.'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/vmjn/GenerateCartoonizedImage3d.png" width="600)'."\n" + ."\n" + .'- Anime style'."\n" + .'This style simulates the anime art style. It can stylize various real-world scenes into anime style, including people, animals, landscapes, and furniture. This style features vivid colors and can transform landscape images into anime-like scenes. It preserves most features of the original image while generating new elements for added creativity.'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/ffhd/GenerateCartoonizedImage2ciyuan.png" width="600)'."\n" + ."\n" + .'- Fresh and clean style'."\n" + .'This style features soft and elegant colors overall. It is primarily designed for portraits but can also be used for other types of images. The generated images resemble the style of GD illustrators, making it suitable for users who prefer illustration styles.'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/ubyx/GenerateCartoonizedImagexiaoqingxin.png" width="600)'."\n" + ."\n" + .'- Futuristic tech style'."\n" + .'This style simulates a futuristic mecha sci-fi look. It produces dramatic transformations with high creativity, making it ideal for users interested in futuristic technology aesthetics.'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/bxvf/GenerateCartoonizedImageweilaikeji.png" width="600)'."\n" + ."\n" + .'- Traditional Chinese painting style'."\n" + .'This style simulates the traditional Chinese meticulous painting style. It transforms characters into classical Chinese attire, creating a realistic classical Chinese painting. It is suitable for users who enjoy traditional Chinese aesthetics.'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/jtkr/GenerateCartoonizedImageguohuagufeng.png" width="600)'."\n" + ."\n" + .'- Battle general style'."\n" + .'This style simulates an ancient battlefield look, combining characters with armor elements for a classical atmosphere.'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/abqy/GenerateCartoonizedImagejiangjunbaizhan.png" width="600)'."\n" + ."\n" + .'- Colorful cartoon style'."\n" + .'This style simulates the look of hand-drawn watercolor and crayon art, creating a handcrafted feel.'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/yrjf/GenerateCartoonizedImagexuancaikatong.png" width="600)'."\n" + ."\n" + .'- Elegant Chinese style'."\n" + .'This style simulates an elegant classical Chinese aesthetic. It transforms characters into classical Chinese attire with a 2.5D style, making it ideal for users who enjoy traditional Chinese aesthetics.'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/tztf/GenerateCartoonizedImageqingyaguofeng.png" width="600)'."\n" + ."\n" + .'> - You can access [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for human assistance.'."\n" + .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?tagName=imageenhan&children=GenerateCartoonizedImage) to experience the feature and make online purchases.'."\n" + .'- For questions about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration, usage, or consultation, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Common scenarios'."\n" + .'Social media avatar generation: Users can upload selfies, pet photos, or landscape photos, specify a preferred cartoon style, and generate corresponding images with high creativity.'."\n" + ."\n" + .'## Advantages'."\n" + .'- Broad cartoonization coverage: Based on a generative foundation model, the feature can process portraits, pets, scenes, and other elements to generate detailed and vivid cartoonized effects.'."\n" + .'- Diverse styles: Supports multiple generation styles to meet different user preferences and needs.'."\n" + .'- Intelligent processing: Automatically recognizes the gender of characters, scene categories, and other attributes in the input image, ensuring that the output image is both entertaining and aesthetically pleasing while staying close to the original.'."\n" + .'- High quality: Generates high-quality images with minimal artifacts.'."\n" + ."\n" + .'## Integration guide'."\n" + .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com). In the upper-right corner, click **Register Now** and follow the instructions to create an account.'."\n" + .'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/GenerateImageWithText?lang=JAVA) to debug the feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the references as needed and invoke it.'."\n" + ."\n" + .'6. Sample code: For sample code in common languages for this feature, see [GenerateCartoonizedImage sample code](~~602271~~). For sample code to query asynchronous task results in common languages, see [Query asynchronous task result sample code](~~607974~~).'."\n" + ."\n" + .'7. Direct client invocations: Common client invocation methods for this feature include the following:'."\n" + .'- [Direct invocation from web frontend](~~467779~~)'."\n" + .'- [Direct invocation from mini programs](~~467780~~)'."\n" + .'- [Direct invocation from Android](~~467781~~)'."\n" + .'- [Direct invocation from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + ."\n" + .'- The image size cannot exceed 10 MB.'."\n" + .'- Supported image formats: JPEG, PNG, JPG, BMP, and WEBP.'."\n" + .'- The input image dimensions must be at least 256 × 256 pixels and at most 5760 × 3240 pixels.'."\n" + .'- The short side of the output image is 1536 pixels. When the ratio of the long side to the short side of the input image is less than or equal to 1.5:1, the original aspect ratio is preserved. When the ratio exceeds 1.5:1, adaptive cropping is applied to produce an output aspect ratio of 1.5:1.'."\n" + ."\n" + .'## Call procedure'."\n" + .'This feature is asynchronous and requires two steps to call.'."\n" + .'Step 1: Call the GenerateCartoonizedImage operation to submit a task. After the request succeeds, a task ID is returned.'."\n" + .'Step 2: Call the [GetAsyncJobResult](~~607824~~) operation to query the result. Use the task ID to query the task execution status and result. If the task is still being processed, wait a moment before querying again.'."\n" + ."\n" + .'## Billing description'."\n" + .'For the billable methods and pricing of generative image cartoonization, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging operation below is a paid operation. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?tagName=imageenhan&children=GenerateCartoonizedImage).', + 'responseParamsDescription' => '## Query results'."\n" + .'This is an asynchronous operation that does not return the actual result immediately. Use the returned RequestId to call the GetAsyncJobResult operation to obtain the actual result. For more information, see [GetAsyncJobResult](~~607824~~).'."\n" + ."\n" + .'## SDK reference'."\n" + .'For the text-to-image feature under the Alibaba Cloud Vision AI Image Production category, we recommend using the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the Image Production (imageenhan) AI category. File parameters can be passed as local files or arbitrary URLs through the SDK. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in common languages for this feature, see [GenerateCartoonizedImage sample code](~~602271~~). For sample code to query asynchronous task results in common languages, see [Query asynchronous task result sample code](~~607974~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of generative image cartoonization, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2024-02-20T02:45:44.000Z', 'description' => 'Response parameters changed'], + ['createdAt' => '2023-12-27T06:30:12.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GenerateCartoonizedImage'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:GenerateCartoonizedImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4EF3C65B-C3CC-425B-AFB3-2FE6B98C578B\\",\\n \\"Data\\": {\\n \\"Exposure\\": 0.1\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 4EF3C65B-C3CC-425B-AFB3-2FE6B98C578B\\n \\n 0.1\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', ], - 'AssessSharpness' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GenerateSuperResolutionImage' => [ + 'summary' => 'This topic describes the syntax and provides examples of the GenerateSuperResolutionImage operation in the image production (imageenhan) category.', + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [], 'parameters' => [ [ - 'name' => 'ImageURL', + 'name' => 'ImageUrl', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/AssessSharpness/AssessSharpness1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the input image. We recommend that you use an Object Storage Service (OSS) URL in the China (Shanghai) region. If the file is stored locally or the OSS URL is not in the China (Shanghai) region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/xxx/1025.jpg', 'title' => ''], + ], + [ + 'name' => 'Scale', + 'in' => 'formData', + 'schema' => ['description' => 'The image upscaling factor. Valid values: 1, 2, 3, and 4. Default value: 2.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '2', 'title' => ''], + ], + [ + 'name' => 'UserData', + 'in' => 'formData', + 'schema' => ['description' => 'This parameter is a reserved field. You do not need to specify this parameter.', 'type' => 'string', 'required' => false, 'example' => '无', 'title' => ''], + ], + [ + 'name' => 'OutputFormat', + 'in' => 'formData', + 'schema' => ['description' => 'The storage format of the output image. Valid values: `png`, `jpg`, and `bmp`. Default value: `png`.', 'type' => 'string', 'required' => false, 'example' => 'jpg', 'title' => ''], + ], + [ + 'name' => 'OutputQuality', + 'in' => 'formData', + 'schema' => ['description' => 'The quality factor of the output image. A larger value indicates higher quality. Valid values: \\[30,100]. Default value: 95. This parameter takes effect only when `outputFormat` is set to `jpg`.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '95', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'description' => '1', + 'title' => '', + 'description' => 'Schema of Response', + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => 'C0B594A1-383E-4F97-A740-0D51CF8E37D2', - 'type' => 'string', - ], + 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '4ad5c3ef-5ac4-4e1c-b14f-90d939aa73eb'], 'Data' => [ - 'description' => '', + 'description' => 'The returned result data. After the asynchronous task is executed successfully, invoke the [GetAsyncJobResult](~~607824~~) operation and perform JSON deserialization on the Result field to obtain this data.', + 'type' => 'object', 'properties' => [ - 'Sharpness' => [ - 'description' => '', - 'example' => '0.1', - 'format' => 'float', - 'type' => 'number', - ], + 'ResultUrl' => ['description' => 'The OSS URL of the output image.'."\n" + ."\n" + .'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, you can no longer access it. To save the file for an extended period or permanently, access the URL within 30 minutes, download the file, and save it to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/diffusion-sr/2023-02-07/d01cede5-28bf-4719-96d9-77198d51c2f2/20230207_150650515242_3dbctnjy5f.jpg?Expires=1675755681&OSSAccessKeyId=LTAI****************&Signature=4FeDXpp0DilXsHdt7qc%2Ffh3zoC****', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], + 'Message' => ['description' => 'The message returned after the asynchronous task is submitted.', 'type' => 'string', 'example' => '该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。', 'title' => ''], ], - 'type' => 'object', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'staticInfo' => ['returnType' => 'synchronous'], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"4ad5c3ef-5ac4-4e1c-b14f-90d939aa73eb\\",\\n \\"Data\\": {\\n \\"ResultUrl\\": \\"http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/diffusion-sr/2023-02-07/d01cede5-28bf-4719-96d9-77198d51c2f2/20230207_150650515242_3dbctnjy5f.jpg?Expires=1675755681&OSSAccessKeyId=LTAI****************&Signature=4FeDXpp0DilXsHdt7qc%2Ffh3zoC****\\"\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","type":"json"}]', + 'title' => 'Generative image super-resolution', + 'description' => '## Feature description'."\n" + .'Based on a generative foundation model, this operation enhances image resolution details, repairs images, and scales up images by a specified factor, significantly improving image detail richness and making images clearer. Compared with the [standard image super-resolution algorithm](~~151947~~), this operation generates more realistic and natural details.'."\n" + .'The following figure shows an example of this operation (the left image is the original, and the right image is the processed result):'."\n" + .'![](https://help-static-aliyun-doc.aliyuncs.com/file-manage-files/zh-CN/20231227/gmzo/GenerateSuperResolutionImage.png" width="600)'."\n" + ."\n" + .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n" + .'- To learn more about Alibaba Cloud Vision Intelligence Open Platform visual AI API integration, usage, or consultation, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Common scenarios'."\n" + ."\n" + .'- Generate more details: Uses a generative foundation model to generate more detail textures for images, significantly improving image quality for various types of images.'."\n" + .'- 4x upscaling: Supports up to 4x upscaling, transforming low-resolution images into high-resolution images.'."\n" + ."\n" + .'## Benefits'."\n" + ."\n" + .'- Print quality enhancement: Enhances images intended for print publication to meet the high DPI, high resolution, and high clarity requirements for print delivery.'."\n" + .'- Legacy material enhancement: Enhances important classic legacy images, making blurry low-resolution materials clearer.'."\n" + ."\n" + .'## Getting started'."\n" + .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China Site Account** in the upper-right corner, and follow the instructions to complete account registration.'."\n" + .'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/GenerateImageWithText?lang=JAVA) to debug the operation online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the AI category Image Production (imageenhan) in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the references as needed and invoke the operation.'."\n" + ."\n" + .'6. Sample code: For sample code in common programming languages, see [Generative image super resolution sample code](~~608846~~). For sample code to query asynchronous task results in common programming languages, see [Query asynchronous task result sample code](~~607974~~).'."\n" + ."\n" + .'7. Direct client invocations: Common client invocation methods for this operation include the following:'."\n" + .'- [Direct invocation from web frontend](~~467779~~)'."\n" + .'- [Direct invocation from mini programs](~~467780~~)'."\n" + .'- [Direct invocation from Android](~~467781~~)'."\n" + .'- [Direct invocation from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + ."\n" + .'- Supported image types: JPEG, PNG, JPG, and BMP.'."\n" + .'- Input image resolution: The short side must not exceed 1080 pixels, and the long side must not exceed 5000 pixels. If the short side exceeds 1080 pixels, no error is returned and the algorithm automatically adjusts the image. If the long side exceeds 5000 pixels, the algorithm returns an error. The minimum image resolution is 64 × 64.'."\n" + .'- Input image aspect ratio: The aspect ratio must not exceed 2:1.'."\n" + .'- The image size must not exceed 20 MB.'."\n" + ."\n" + .'## Procedure'."\n" + .'This is an asynchronous operation that requires two steps.'."\n" + .'Step 1: Call the GenerateSuperResolutionImage operation to submit a task. If the request is successful, a task ID is returned.'."\n" + .'Step 2: Call the [GetAsyncJobResult](~~607824~~) operation to query the result based on the task ID. If the task is still being processed, wait a moment before querying again. Do not submit duplicate tasks while the same task is still being processed.'."\n" + ."\n" + .'## Billing'."\n" + .'For information about the billable methods and pricing of generative image super resolution, see [Billing](~~202482~~).', + 'responseParamsDescription' => '## Query results'."\n" + .'This is an asynchronous operation that does not return actual results. You must call the GetAsyncJobResult operation with the returned RequestId to obtain the actual results. For more information, see [GetAsyncJobResult](~~607824~~).'."\n" + ."\n" + .'## SDK reference'."\n" + .'For the text-to-image generation feature under the Alibaba Cloud Vision AI Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the AI category Image Production (imageenhan). The SDK supports local files and URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in common programming languages, see [Generative image super-resolution sample code](~~608846~~). For sample code to query asynchronous task results in common programming languages, see [Query asynchronous task result sample code](~~607974~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of generative image super-resolution, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging console are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2024-02-20T02:48:43.000Z', 'description' => 'Response parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GenerateSuperResolutionImage'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:GenerateSuperResolutionImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C0B594A1-383E-4F97-A740-0D51CF8E37D2\\",\\n \\"Data\\": {\\n \\"Sharpness\\": 0.1\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n C0B594A1-383E-4F97-A740-0D51CF8E37D2\\n \\n 0.1\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', ], - 'ChangeImageSize' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'GetAsyncJobResult' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'readAndWrite', + 'operationType' => 'read', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'update', - ], + 'systemTags' => ['operationType' => 'get'], 'parameters' => [ [ - 'name' => 'Width', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '800', - 'format' => 'int32', - 'maximum' => '2000', - 'minimum' => '10', - 'required' => true, - 'type' => 'integer', - ], - ], - [ - 'name' => 'Height', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '600', - 'format' => 'int32', - 'maximum' => '2000', - 'minimum' => '10', - 'required' => true, - 'type' => 'integer', - ], - ], - [ - 'name' => 'Url', + 'name' => 'JobId', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ChangeImageSize/ChangeImageSize5.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The RequestId returned by the asynchronous operation. You can use this parameter to query the actual result of the asynchronous operation.', 'type' => 'string', 'required' => true, 'example' => '11A898F7-29D7-4AB3-B639-8BBDE671BBD5', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'description' => '1', + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '2833446F-A431-40EB-A502-6EC9DFEEEEB0', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '6B4B827E-1CAA-43CD-BBDF-BB572E035976', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned result data.', + 'type' => 'object', 'properties' => [ - 'Url' => [ - 'description' => '', - 'example' => 'http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/result_filter/2019-11-21/invi_filter_015743271470661000112_NVKmET.png?Expires=1574586347&OSSAccessKeyId=LTAI4FeJ8qKkYn6SrHhQ****&Signature=QqRAiqvyXsVlZ77M8yFc5QKJDE****', - 'type' => 'string', - ], - 'RetainLocation' => [ - 'description' => '', - 'properties' => [ - 'Width' => [ - 'description' => '', - 'example' => '298', - 'format' => 'int32', - 'type' => 'integer', - ], - 'Height' => [ - 'description' => '', - 'example' => '224', - 'format' => 'int32', - 'type' => 'integer', - ], - 'Y' => [ - 'description' => '', - 'example' => '0', - 'format' => 'int32', - 'type' => 'integer', - ], - 'X' => [ - 'description' => '', - 'example' => '0', - 'format' => 'int32', - 'type' => 'integer', - ], - ], - 'type' => 'object', - ], + 'Status' => ['description' => 'The status of the asynchronous task. Valid values:'."\n" + ."\n" + .'- QUEUING: The task is queuing.'."\n" + ."\n" + .'- PROCESSING: The task is being processed.'."\n" + ."\n" + .'- PROCESS_SUCCESS: The task was processed.'."\n" + ."\n" + .'- PROCESS_FAILED: The task failed to be processed.'."\n" + ."\n" + .'- TIMEOUT_FAILED: The task timed out.'."\n" + ."\n" + .'- LIMIT_RETRY_FAILED: The maximum number of retries was exceeded.', 'type' => 'string', 'example' => 'PROCESS_SUCCESS', 'title' => ''], + 'ErrorMessage' => ['description' => 'The error message of the asynchronous task.', 'type' => 'string', 'example' => 'paramsIllegal', 'title' => ''], + 'Result' => ['description' => 'The actual result returned by the asynchronous task.', 'type' => 'string', 'example' => 'http://viapi-cn-shanghai-dha-filter.oss-cn-shanghai.aliyuncs.com/upload/recoloring-hd-2020-06-22-19-39-25-798c9cb57f-v6pj4/2020-6-23/invi_filter_015928997797691000043_tIPX7W.jpg?Expires=1592901579&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=qelgcQJBnzRogPybEPDDrDIjHd****', 'title' => ''], + 'ErrorCode' => ['description' => 'The error code of the asynchronous task.', 'type' => 'string', 'example' => 'InvalidParameter', 'title' => ''], + 'JobId' => ['description' => 'The asynchronous task ID.', 'type' => 'string', 'example' => '7435839A-5B92-4AA1-B2DE-5B6C98C04DDE', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"6B4B827E-1CAA-43CD-BBDF-BB572E035976\\",\\n \\"Data\\": {\\n \\"Status\\": \\"PROCESS_SUCCESS\\",\\n \\"ErrorMessage\\": \\"paramsIllegal\\",\\n \\"Result\\": \\"http://viapi-cn-shanghai-dha-filter.oss-cn-shanghai.aliyuncs.com/upload/recoloring-hd-2020-06-22-19-39-25-798c9cb57f-v6pj4/2020-6-23/invi_filter_015928997797691000043_tIPX7W.jpg?Expires=1592901579&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=qelgcQJBnzRogPybEPDDrDIjHd****\\",\\n \\"ErrorCode\\": \\"InvalidParameter\\",\\n \\"JobId\\": \\"7435839A-5B92-4AA1-B2DE-5B6C98C04DDE\\"\\n }\\n}","type":"json"}]', + 'title' => 'Query asynchronous task results', + 'summary' => 'This topic describes the syntax and examples of the GetAsyncJobResult operation for querying asynchronous task results.', + 'description' => '## Feature description'."\n" + .'For asynchronous operations, the response returned after you invoke an API operation does not contain the actual result. Save the RequestId from the response, and then invoke GetAsyncJobResult to obtain the actual result.'."\n" + ."\n" + .'> - Files generated by asynchronous tasks expire after 30 minutes. To retain them for long-term use, download the files to a local server or store them in Object Storage Service (OSS) promptly. For more information about OSS operations, see [Upload objects](~~31886~~).'."\n" + .'> - To learn more about accessing Alibaba Cloud Vision Intelligence Open Platform visual AI API operations, using the operations, or consulting on related issues, join the DingTalk group (23109592) to contact us.'."\n" + ."\n\n" + .'All operations in the video production category are asynchronous. You must invoke GetAsyncJobResult to obtain the actual results.', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'We recommend that you use an SDK to call Alibaba Cloud Vision AI operations. SDKs are available for multiple programming languages. You can use an SDK to pass file parameters as local files or URLs. For more information, see [SDK overview](~~145033~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes related to querying asynchronous task results, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the images or files you upload comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging console expire after 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-04-24T08:14:08.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:GetAsyncJobResult', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2833446F-A431-40EB-A502-6EC9DFEEEEB0\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/result_filter/2019-11-21/invi_filter_015743271470661000112_NVKmET.png?Expires=1574586347&OSSAccessKeyId=LTAI4FeJ8qKkYn6SrHhQ****&Signature=QqRAiqvyXsVlZ77M8yFc5QKJDE****\\",\\n \\"RetainLocation\\": {\\n \\"Width\\": 298,\\n \\"Height\\": 224,\\n \\"Y\\": 0,\\n \\"X\\": 0\\n }\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 2833446F-A431-40EB-A502-6EC9DFEEEEB0\\n \\n http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/result_filter/2019-11-21/invi_filter_015743271470661000112_NVKmET.png?Expires=1574586347&OSSAccessKeyId=LTAI4FeJ8qKkYn6SrHhQ****&Signature=QqRAiqvyXsVlZ77M8yFc5QKJDE****\\n \\n 298\\n 224\\n 0\\n 0\\n \\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', ], - 'ColorizeImage' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ImageBlindCharacterWatermark' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1513,80 +1503,176 @@ 'systemTags' => [], 'parameters' => [ [ - 'name' => 'ImageURL', + 'name' => 'FunctionType', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ColorizeImage/ColorizeImage1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The function type. Valid values:'."\n" + .'- encode_text: adds a text watermark by using the legacy model.'."\n" + ."\n" + .'- encode_text_plus: adds a text watermark by using the new model 1.'."\n" + ."\n" + .'- encode_text_bold: adds a text watermark by using the new model 2.'."\n" + ."\n" + .'- decode_text: decodes the text watermark in an image by using the legacy model. This corresponds to the encode_text watermark method.'."\n" + ."\n" + .'- decode_text_plus: decodes the text watermark in an image by using the new model 1. This corresponds to the encode_text_plus watermark method.'."\n" + ."\n" + .'- decode_text_bold: decodes the text watermark in an image by using the new model 2. This corresponds to the encode_text_bold watermark method.', 'type' => 'string', 'required' => true, 'example' => 'encode_text', 'title' => ''], + ], + [ + 'name' => 'Text', + 'in' => 'formData', + 'schema' => ['description' => 'The watermark text to be added. The text can contain up to 16 characters. Exceeding this limit affects the watermark quality.'."\n" + .'>- This parameter is required when FunctionType is set to `encode_text`, `encode_text_plus`, or `encode_text_bold`.'."\n" + .'- Do not set this parameter when FunctionType is set to `decode_text`, `decode_text_plus`, or `decode_text_bold`.', 'type' => 'string', 'required' => false, 'example' => '阿里云版权所有一二三四五六七八九', 'title' => ''], + ], + [ + 'name' => 'WatermarkImageURL', + 'in' => 'formData', + 'schema' => ['description' => 'The URL of the image to be parsed, which is the composite image that contains the text watermark. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n" + .'>- This parameter is required when FunctionType is set to `decode_text`, `decode_text_plus`, or `decode_text_bold`.'."\n" + .'- Do not set this parameter when FunctionType is set to `encode_text`, `encode_text_plus`, or `encode_text_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-doc.oss-cn-shanghai.aliyuncs.com/imageenhan/xxxxx.jpg', 'title' => ''], + ], + [ + 'name' => 'OutputFileType', + 'in' => 'formData', + 'schema' => ['description' => 'The output image format. Valid values: `png`, `jpg`, and `bmp`. Default value: `png`.'."\n" + .'>- This parameter is required when FunctionType is set to `encode_text`, `encode_text_plus`, or `encode_text_bold`.'."\n" + .'- Do not set this parameter when FunctionType is set to `decode_text`, `decode_text_plus`, or `decode_text_bold`.', 'type' => 'string', 'required' => false, 'example' => 'jpg', 'title' => ''], + ], + [ + 'name' => 'QualityFactor', + 'in' => 'formData', + 'schema' => ['description' => 'The quality of the output image. A larger value indicates higher quality. Valid values: 1 to 100. Default value: 100.'."\n" + .'>This parameter takes effect only when OutputFileType is set to `jpg`.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '100', 'title' => ''], + ], + [ + 'name' => 'OriginImageURL', + 'in' => 'formData', + 'schema' => ['description' => 'The URL of the original image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n" + .'>- This parameter is required when FunctionType is set to `encode_text`, `encode_text_plus`, `encode_text_bold`, or `decode_text`.'."\n" + .'- Do not set this parameter when FunctionType is set to `decode_text_plus` or `decode_text_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '124A4B09-68EF-4178-B98D-319089D4268B', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '2457E1ED-9C76-4386-B9A2-7E41B7D6E849', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', + 'type' => 'object', 'properties' => [ - 'ImageURL' => [ - 'description' => '', - 'example' => 'http://algo-app-aic-vc-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/face-enhancement/2020_11_26/20201126_182812286268_079260.jpg?Expires=1606388292&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=f71Bx37g%2BGhM%2B6FOXM0EbNL8W4****', - 'type' => 'string', - ], + 'WatermarkImageURL' => ['description' => 'The URL of the watermarked image. This parameter is returned when the function type is set to `encode_text` or `encode_text_plus`.'."\n" + .'> This is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To retain the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', 'title' => ''], + 'TextImageURL' => ['description' => 'The URL of the image that contains only the parsed text. This parameter is returned when the function type is set to `decode_text` or `decode_text_plus`.'."\n" + .'> This is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To retain the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"2457E1ED-9C76-4386-B9A2-7E41B7D6E849\\",\\n \\"Data\\": {\\n \\"WatermarkImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\",\\n \\"TextImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI****************&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\"\\n }\\n}","type":"json"}]', + 'title' => 'Invisible character watermark for images', + 'summary' => 'This topic describes the syntax and provides examples of the invisible character watermark feature (ImageBlindCharacterWatermark).', + 'description' => '## Feature description'."\n" + .'The invisible character watermark feature allows you to add or parse specified text watermarks in images.'."\n" + .'The following figure shows an example of this feature:'."\n" + .'![](https://img.alicdn.com/tfs/TB1jJ0SAkY2gK0jSZFgXXc5OFXa-746-395.png)'."\n" + ."\n" + .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from our support team.'."\n" + .'- You can try this feature for free on the Visual Intelligence Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImageBlindCharacterWatermark) to experience this feature or purchase it online.'."\n" + .'- For questions about API integration, usage, or consultation regarding the Alibaba Cloud Visual Intelligence Platform, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Common scenarios'."\n" + .'- Copyright protection: Image authors are entitled to copyrights by law. Adding invisible watermarks to images helps authors or parties with authorization prove copyright ownership and prevents unauthorized access and illegal use of images.'."\n" + .'- Information leak prevention: In images containing confidential information, different invisible watermarks can be applied for different parties that access the images. If an image is leaked, the invisible watermark can be parsed to trace the source of the leak.'."\n" + ."\n" + .'## Advantages'."\n" + .'Compared with traditional stamp watermarks, invisible watermarks cannot be perceived by viewers and do not affect the visual quality of images. The watermarks cannot be detected by users or removed by common watermark removal methods. However, the watermarks can be parsed by the invisible character watermark feature to prove copyright ownership of images.'."\n" + ."\n" + .'## Integration guide'."\n" + .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China Site Account** in the upper-right corner, and follow the instructions to complete the registration.'."\n" + .'2. Activate the service: Make sure that you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ImageBlindCharacterWatermark?lang=JAVA&sdkStyle=dara¶ms=%7B%22OriginImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImageBlindCharacterWatermark%2FImageBlindCharacterWatermark1.png%22%2C%22Text%22%3A%22%E9%98%BF%E9%87%8C%E4%BA%91%E7%89%88%E6%9D%83%E6%89%80%E6%9C%89%22%2C%22FunctionType%22%3A%22encode_text_plus%22%2C%22QualityFactor%22%3A100%2C%22OutputFileType%22%3A%22jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language that you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the Image Production (imageenhan) category in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the references as needed and invoke the API operation.'."\n" + ."\n" + .'6. Direct client calls: Common client call methods for this feature include the following:'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + ."\n" + .'- Image format: JPEG, JPG, PNG, or BMP.'."\n" + .'- Image size: up to 3 MB.'."\n" + .'- Image resolution: greater than 5 × 5 pixels.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billable methods'."\n" + .'For information about the billable methods and pricing of the invisible character watermark feature, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging API operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImageBlindCharacterWatermark).', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'We recommend that you use an SDK to call the invisible character watermark feature under the Visual AI Image Production category. SDKs are available in multiple programming languages. When calling this feature, select the SDK package for the Image Production (imageenhan) category. File parameters support local files and URLs of any type when called through the SDK. For more information, see [SDK overview](~~145033~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of the invisible character watermark feature, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-09-29T07:58:12.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImageBlindCharacterWatermark'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ImageBlindCharacterWatermark', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"124A4B09-68EF-4178-B98D-319089D4268B\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vc-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/face-enhancement/2020_11_26/20201126_182812286268_079260.jpg?Expires=1606388292&OSSAccessKeyId=LTAI****************&Signature=f71Bx37g%2BGhM%2B6FOXM0EbNL8W4****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 124A4B09-68EF-4178-B98D-319089D4268B\\n \\n http://algo-app-aic-vc-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/face-enhancement/2020_11_26/20201126_182812286268_079260.jpg?Expires=1606388292&OSSAccessKeyId=LTAI****************&Signature=f71Bx37g%2BGhM%2B6FOXM0EbNL8W4****\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', ], - 'EnhanceImageColor' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'ImageBlindPicWatermark' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1597,99 +1683,176 @@ 'systemTags' => [], 'parameters' => [ [ - 'name' => 'ImageURL', + 'name' => 'FunctionType', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/EnhanceImageColor/EnhanceImageColor1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The function type. Valid values:'."\n" + ."\n" + .'- encode_pic: adds an image watermark by using the legacy model.'."\n" + ."\n" + .'- encode_pic_plus: adds an image watermark by using the new model 1.'."\n" + ."\n" + .'- encode_pic_bold: adds an image watermark by using the new model 2.'."\n" + ."\n" + .'- decode_pic: decodes the image watermark from an image by using the legacy model. This corresponds to the encode_pic watermark method.'."\n" + ."\n" + .'- decode_pic_plus: decodes the image watermark from an image by using the new model 1. This corresponds to the encode_pic_plus watermark method.'."\n" + ."\n" + .'- decode_pic_bold: decodes the image watermark from an image by using the new model 2. This corresponds to the encode_pic_bold watermark method.', 'type' => 'string', 'required' => true, 'example' => 'encode_pic', 'title' => ''], ], [ - 'name' => 'OutputFormat', + 'name' => 'LogoURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'png', - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the watermark image to be added. We recommend that you use an OSS URL in the China (Shanghai) region. If the file is stored locally or in an OSS bucket outside the China (Shanghai) region, see [File URL processing](~~155645~~).'."\n" + ."\n" + .'>- This parameter is required when FunctionType is set to `encode_pic`, `encode_pic_plus`, or `encode_pic_bold`.'."\n" + .'- Do not set this parameter when FunctionType is set to `decode_pic`, `decode_pic_plus`, or `decode_pic_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', 'title' => ''], ], [ - 'name' => 'Mode', + 'name' => 'WatermarkImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'LogC', - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the image to be decoded, which is the composite image that contains the image watermark. We recommend that you use an OSS URL in the China (Shanghai) region. If the file is stored locally or in an OSS bucket outside the China (Shanghai) region, see [File URL processing](~~155645~~).'."\n" + .'>- This parameter is required when FunctionType is set to `decode_pic`, `decode_pic_plus`, or `decode_pic_bold`.'."\n" + .'- Do not set this parameter when FunctionType is set to `encode_pic`, `encode_pic_plus`, or `encode_pic_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-doc.oss-cn-shanghai.aliyuncs.com/imageenhan/xxxxx.jpg', 'title' => ''], + ], + [ + 'name' => 'OutputFileType', + 'in' => 'formData', + 'schema' => ['description' => 'The format of the output image. Valid values: `jpeg`, `png`, `jpg`, and `bmp`. Default value: `png`.'."\n" + .'>- This parameter is required when FunctionType is set to `encode_pic`, `encode_pic_plus`, or `encode_pic_bold`.'."\n" + .'- Do not set this parameter when FunctionType is set to `decode_pic`, `decode_pic_plus`, or `decode_pic_bold`.', 'type' => 'string', 'required' => false, 'example' => 'jpg', 'title' => ''], + ], + [ + 'name' => 'QualityFactor', + 'in' => 'formData', + 'schema' => ['description' => 'The quality of the output image. A larger value indicates higher quality. Valid values: 1 to 100. Default value: 100.'."\n" + .'>This parameter takes effect only when OutputFileType is set to `jpg`.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'example' => '100', 'title' => ''], + ], + [ + 'name' => 'OriginImageURL', + 'in' => 'formData', + 'schema' => ['description' => 'The URL of the original image. We recommend that you use an OSS URL in the China (Shanghai) region. If the file is stored locally or in an OSS bucket outside the China (Shanghai) region, see [File URL processing](~~155645~~).'."\n" + .'>- This parameter is required when FunctionType is set to `encode_pic`, `encode_pic_plus`, `encode_pic_bold`, or `decode_pic`.'."\n" + .'- Do not set this parameter when FunctionType is set to `decode_pic_plus` or `decode_pic_bold`.', 'type' => 'string', 'required' => false, 'isFileTransferUrl' => true, 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/xxxxx.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'description' => '1', + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '2F306ABD-5BC3-4FA0-89CF-0DED5B3654EB', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'DE7869E4-0ACE-4C02-8B98-540B49F49205', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', + 'type' => 'object', 'properties' => [ - 'ImageURL' => [ - 'description' => '', - 'example' => 'http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-recolor/2020-06-23-10/24%3A14-3cf26e84-a5d2-49b0-8332-0e139e20c49e.png?Expires=1592909654&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=fHrYvitvm0qZJ9nrWYa%2Fjd4pQS****', - 'type' => 'string', - ], + 'WatermarkImageURL' => ['description' => 'The URL of the watermarked image. This parameter is returned when the function type is `encode_pic` or `encode_pic_plus`.'."\n" + .'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, it can no longer be accessed. To store the file for a longer period or permanently, access the URL within 30 minutes, download the file, and save it to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', 'title' => ''], + 'LogoURL' => ['description' => 'The URL of the decoded watermark image. This parameter is returned when the function type is `decode_pic` or `decode_pic_plus`.'."\n" + .'> This URL is a temporary URL that is valid for 30 minutes. After the URL expires, it can no longer be accessed. To store the file for a longer period or permanently, access the URL within 30 minutes, download the file, and save it to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"DE7869E4-0ACE-4C02-8B98-540B49F49205\\",\\n \\"Data\\": {\\n \\"WatermarkImageURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\",\\n \\"LogoURL\\": \\"http://algo-app-taobao-mm-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/pixelai-portrait-beauty%2F2020_03_04%2F61f544a1a5004c88a2bf29452db494e9.jpeg?OSSAccessKeyId=LTAI4Fmdm1gQonFLrghJ****&Expires=158340****&Signature=Heet1ivG0xFP3YlO6usvd0pmrH****\\"\\n }\\n}","type":"json"}]', + 'title' => 'Invisible image watermark', + 'summary' => 'This topic describes the syntax and provides examples of the invisible image watermark feature (ImageBlindPicWatermark).', + 'description' => '## Feature description'."\n" + .'The invisible image watermark feature allows you to add or extract image watermarks from images.'."\n" + .'For example, if you have an image A, you can call the encode_pic parameter to add an invisible image watermark and obtain image B. Alternatively, you can set image A as OriginImageURL and image B as WatermarkImageURL, and then call the decode_pic parameter to extract the watermark image.'."\n" + ."\n" + .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online assistance.'."\n" + .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImageBlindPicWatermark) to experience this feature or purchase it online.'."\n" + .'- To learn more about API integration, usage, or consultation for Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Common scenarios'."\n" + .'- Copyright protection: Image authors are entitled to copyrights by law. Adding invisible watermarks to images helps authors or authorized parties prove copyright ownership and prevents unauthorized use of images.'."\n" + ."\n" + .'- Information leak prevention: For images that contain confidential information, different invisible watermarks can be applied for different viewers. If an image is leaked, the invisible watermark can be extracted to trace the source of the leak.'."\n" + ."\n" + .'## Advantages'."\n" + .'Compared with traditional visible watermarks, invisible watermarks cannot be perceived by viewers and do not affect the visual quality of images. Users cannot detect the watermarks or remove them by using common watermark removal methods. However, the watermarks can be extracted through the invisible image watermark API to prove copyright ownership of the images.'."\n" + ."\n" + .'## Integration guide'."\n" + .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete account registration.'."\n" + .'2. Activate the service: Make sure that you have activated the [Intelligent Visual Production](https://vision.aliyun.com/imageenhan) service. If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey pair: Make sure that you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ImageBlindPicWatermark?lang=JAVA&sdkStyle=dara¶ms=%7B%22OriginImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImageBlindPicWatermark%2FImageBlindPicWatermark-tj1.jpg%22%2C%22LogoURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImageBlindPicWatermark%2FImageBlindPicWatermark-tj6.jpg%22%2C%22FunctionType%22%3A%22encode_pic_plus%22%2C%22QualityFactor%22%3A100%2C%22OutputFileType%22%3A%22jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the AI category Intelligent Visual Production (imageenhan) in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the references as needed and invoke the API.'."\n" + ."\n" + .'6. Direct client calls: Common client call methods for this feature include the following.'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + .'- Image format: JPEG, JPG, PNG, or BMP.'."\n" + .'- Image size: up to 3 MB.'."\n" + .'- Image resolution: greater than 5 × 5 pixels.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For information about the billable methods and pricing of the invisible image watermark feature, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging API below is a paid API. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImageBlindPicWatermark).', + 'responseParamsDescription' => '## SDK reference'."\n" + .'We recommend that you use an SDK to call the invisible image watermark feature under the Alibaba Cloud Vision AI Intelligent Visual Production category. Multiple programming languages are supported. When calling the API, select the SDK package for the AI category Intelligent Visual Production (imageenhan). The SDK supports both local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of the invisible image watermark feature, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-09-29T07:58:12.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImageBlindPicWatermark'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ImageBlindPicWatermark', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"2F306ABD-5BC3-4FA0-89CF-0DED5B3654EB\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-recolor/2020-06-23-10/24%3A14-3cf26e84-a5d2-49b0-8332-0e139e20c49e.png?Expires=1592909654&OSSAccessKeyId=LTAI****************&Signature=fHrYvitvm0qZJ9nrWYa%2Fjd4pQS****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 2F306ABD-5BC3-4FA0-89CF-0DED5B3654EB\\n \\n http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-recolor/2020-06-23-10/24%3A14-3cf26e84-a5d2-49b0-8332-0e139e20c49e.png?Expires=1592909654&OSSAccessKeyId=LTAI****************&Signature=fHrYvitvm0qZJ9nrWYa%2Fjd4pQS****\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', ], 'ImitatePhotoStyle' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1702,89 +1865,130 @@ [ 'name' => 'StyleUrl', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ImitatePhotoStyle/ImitatePhotoStyle7.jpg', - 'required' => true, - 'type' => 'string', - 'isFileTransferUrl' => true, - ], + 'schema' => ['description' => 'The URL of the reference image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ImitatePhotoStyle/ImitatePhotoStyle7.jpg', 'title' => ''], ], [ 'name' => 'ImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ImitatePhotoStyle/ImitatePhotoStyle1.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the image to which you want to apply the style transfer. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or the OSS URL is in a region other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/ImitatePhotoStyle/ImitatePhotoStyle1.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => 'A880432B-6D9A-4EF4-B7B7-863F38A930D9', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'A880432B-6D9A-4EF4-B7B7-863F38A930D9', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', + 'type' => 'object', 'properties' => [ - 'ImageURL' => [ - 'description' => '', - 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/photo-style-imitation/7c4c0809-5e15-4ca7-84b3-ba16711e3255__5cb220200622-075203.jpg?Expires=1592814125&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=DNhhRFPbMBwpHCEhrLdL%2BBF%2BXs****', - 'type' => 'string', - ], + 'ImageURL' => ['description' => 'The URL of the result image after style transfer.'."\n" + .'> This URL is a temporary address and is valid for 30 minutes. After it expires, the URL is no longer accessible.', 'type' => 'string', 'example' => 'http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/photo-style-imitation/7c4c0809-5e15-4ca7-84b3-ba16711e3255__5cb220200622-075203.jpg?Expires=1592814125&OSSAccessKeyId=LTAI****************&Signature=DNhhRFPbMBwpHCEhrLdL%2BBF%2BXs****', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"A880432B-6D9A-4EF4-B7B7-863F38A930D9\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/photo-style-imitation/7c4c0809-5e15-4ca7-84b3-ba16711e3255__5cb220200622-075203.jpg?Expires=1592814125&OSSAccessKeyId=LTAI****************&Signature=DNhhRFPbMBwpHCEhrLdL%2BBF%2BXs****\\"\\n }\\n}","type":"json"}]', + 'title' => 'Imitate photo style', + 'summary' => 'This topic describes the syntax and examples of ImitatePhotoStyle.', + 'description' => '## Feature description'."\n" + .'The ImitatePhotoStyle feature performs style transfer of the lighting, color, and other attributes that do not affect the original image structure from a reference image to a target image.'."\n" + .'You can try this feature in the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImitatePhotoStyle). The following images show examples of this feature:'."\n" + ."\n" + .'- Original image'."\n" + .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/lbaw/ImitatePhotoStyle.jpg" width="600)'."\n" + ."\n" + .'- Reference image'."\n" + .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/peau/ImitatePhotoStylecankao.jpg" width="600)'."\n" + ."\n" + .'- Result image'."\n" + .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/ajru/ImitatePhotoStylejieguo.jpg" width="600)'."\n" + ."\n" + .'> To request access to Alibaba Cloud Vision Intelligence Open Platform visual AI APIs, learn about API usage, or consult on related issues, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Getting started'."\n" + .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to create an account.'."\n" + .'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/ImitatePhotoStyle?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImitatePhotoStyle%2FImitatePhotoStyle1.jpg%22%2C%22StyleUrl%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FImitatePhotoStyle%2FImitatePhotoStyle6.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the References as needed and invoke the API.'."\n" + ."\n" + .'6. Direct client calls: Common client call methods for this feature include the following:'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from a mini program](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + .'- Image format: JPG, JPEG, or PNG.'."\n" + .'- Image size: Less than 3 MB.'."\n" + .'- Image resolution: Greater than 32 × 32 pixels and less than 3000 × 3000 pixels.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For information about the billable methods and pricing of ImitatePhotoStyle, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging API below is a paid API. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=ImitatePhotoStyle).', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'We recommend that you use an SDK to call the ImitatePhotoStyle feature under the Image Production category of Alibaba Cloud Vision AI. Multiple programming languages are supported. When making the call, select the SDK package for the Image Production (imageenhan) AI category. File parameters support local files and arbitrary URLs through SDK calls. For more information, see [SDK overview](~~145033~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of ImitatePhotoStyle, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the experience debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-12-14T07:02:24.000Z', 'description' => 'Request parameters changed'], + ['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImitatePhotoStyle'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ImitatePhotoStyle', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"A880432B-6D9A-4EF4-B7B7-863F38A930D9\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/photo-style-imitation/7c4c0809-5e15-4ca7-84b3-ba16711e3255__5cb220200622-075203.jpg?Expires=1592814125&OSSAccessKeyId=LTAI****************&Signature=DNhhRFPbMBwpHCEhrLdL%2BBF%2BXs****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n A880432B-6D9A-4EF4-B7B7-863F38A930D9\\n \\n http://vibktprfx-prod-prod-aic-gd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/photo-style-imitation/7c4c0809-5e15-4ca7-84b3-ba16711e3255__5cb220200622-075203.jpg?Expires=1592814125&OSSAccessKeyId=LTAI****************&Signature=DNhhRFPbMBwpHCEhrLdL%2BBF%2BXs****\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', - 'responseParamsDescription' => ' ', ], 'IntelligentComposition' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1797,123 +2001,138 @@ [ 'name' => 'NumBoxes', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '5', - 'format' => 'int32', - 'isFileTransferUrl' => false, - 'required' => false, - 'type' => 'integer', - ], + 'schema' => ['description' => 'The number of output bounding boxes. Default value: 5. Valid values: 1 to 10. Values outside this range are truncated.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'isFileTransferUrl' => false, 'example' => '5', 'title' => ''], ], [ 'name' => 'ImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/IntelligentComposition/IntelligentComposition3.jpg', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. For images stored locally or in OSS regions other than Shanghai, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/IntelligentComposition/IntelligentComposition3.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => 'C1D52018-D67A-46AD-9AAA-031750A6E770', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'C1D52018-D67A-46AD-9AAA-031750A6E770', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', + 'type' => 'object', 'properties' => [ 'Elements' => [ - 'description' => '', + 'description' => 'The intelligent composition results.', + 'type' => 'array', 'items' => [ + 'type' => 'object', 'properties' => [ - 'MinX' => [ - 'description' => '', - 'example' => '43', - 'format' => 'int32', - 'type' => 'integer', - ], - 'Score' => [ - 'description' => '', - 'example' => '3.6567564', - 'format' => 'float', - 'type' => 'number', - ], - 'MaxY' => [ - 'description' => '', - 'example' => '672', - 'format' => 'int32', - 'type' => 'integer', - ], - 'MaxX' => [ - 'description' => '', - 'example' => '981', - 'format' => 'int32', - 'type' => 'integer', - ], - 'MinY' => [ - 'description' => '', - 'example' => '96', - 'format' => 'int32', - 'type' => 'integer', - ], + 'MinX' => ['description' => 'The X coordinate of the upper-left corner of the output bounding box.', 'type' => 'integer', 'format' => 'int32', 'example' => '43', 'title' => ''], + 'Score' => ['description' => 'The score of the output bounding box. Valid values: 0 to 5. A higher score indicates a better composition. A score of 3.8 or higher is recommended as a good composition score.', 'type' => 'number', 'format' => 'float', 'example' => '3.6567564', 'title' => ''], + 'MaxY' => ['description' => 'The Y coordinate of the lower-right corner of the output bounding box.', 'type' => 'integer', 'format' => 'int32', 'example' => '672', 'title' => ''], + 'MaxX' => ['description' => 'The X coordinate of the lower-right corner of the output bounding box.', 'type' => 'integer', 'format' => 'int32', 'example' => '981', 'title' => ''], + 'MinY' => ['description' => 'The Y coordinate of the upper-left corner of the output bounding box.', 'type' => 'integer', 'format' => 'int32', 'example' => '96', 'title' => ''], ], - 'type' => 'object', + 'description' => '', + 'title' => '', + 'example' => '', ], - 'type' => 'array', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"C1D52018-D67A-46AD-9AAA-031750A6E770\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"MinX\\": 43,\\n \\"Score\\": 3.6567564,\\n \\"MaxY\\": 672,\\n \\"MaxX\\": 981,\\n \\"MinY\\": 96\\n }\\n ]\\n }\\n}","type":"json"}]', + 'title' => 'Intelligent composition', + 'summary' => 'Performs intelligent composition by evaluating the aesthetics of an image and outputting bounding boxes that can be used to crop the original image into better compositions.', + 'description' => '## Description'."\n" + .'The intelligent composition feature evaluates the aesthetics of an input image and outputs bounding boxes. You can use these bounding boxes to crop the original image into better compositions.'."\n" + ."\n" + .'> - You can join the Chinese-language DingTalk group (China only, China-language only, group ID 23109592) for Chinese-language technical support from Alibaba Cloud Vision Intelligence Open Platform.'."\n" + .'- You can try this feature for free on the Vision Intelligence Open Platform. Click [Chinese-language China-only Free Trial](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=IntelligentComposition) to try this feature or purchase it online.'."\n" + .'- For China-site Chinese-language help, use [Chinese-language online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2).'."\n" + ."\n" + .'## Getting started'."\n" + .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **China-site Sign Up** in the upper-right corner, and follow the on-screen instructions to create an account.'."\n" + .'2. Activate the service: Make sure you have activated the [Intelligent Visual Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using an AccessKey pair of a RAM user, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/IntelligentComposition?lang=JAVA&sdkStyle=dara¶ms={%22ImageURL%22:%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FIntelligentComposition%2FIntelligentComposition1.jpg%22,%22NumBoxes%22:5}&tab=DEBUG) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the Intelligent Visual Production (imageenhan) category in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n" + ."\n" + .'6. Direct client calls: Common client call methods for this feature include the following:'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from a mini program](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + .'- Image format: JPEG, JPG, PNG, BMP, or WEBP.'."\n" + .'- Image size: less than 3 MB.'."\n" + .'- Image resolution: greater than 32 × 32 pixels.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For information about the billable methods and pricing of intelligent composition, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging operation below is a paid operation. To try it for free, go to the [Chinese-language China-only Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=IntelligentComposition).', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'We recommend that you use an SDK to call the intelligent composition feature under the Alibaba Cloud Vision AI Intelligent Visual Production category. SDKs are available in multiple programming languages. When making calls, select the SDK package for the Intelligent Visual Production (imageenhan) category. File parameters support local files and arbitrary URLs when called through the SDK. For more information, see [SDK overview](~~145033~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of intelligent composition, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'IntelligentComposition'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:IntelligentComposition', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"C1D52018-D67A-46AD-9AAA-031750A6E770\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"MinX\\": 43,\\n \\"Score\\": 3.6567564,\\n \\"MaxY\\": 672,\\n \\"MaxX\\": 981,\\n \\"MinY\\": 96\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"C1D52018-D67A-46AD-9AAA-031750A6E770\\n\\n \\n 981\\n 672\\n 43\\n 3.6567564\\n 96\\n \\n \\n 896\\n 736\\n 43\\n 3.594815\\n 32\\n \\n \\n 981\\n 736\\n 43\\n 3.5908668\\n 32\\n \\n \\n 981\\n 608\\n 43\\n 3.5745924\\n 96\\n \\n \\n 896\\n 672\\n 43\\n 3.5324287\\n 96\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', ], 'MakeSuperResolutionImage' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], @@ -1926,467 +2145,851 @@ [ 'name' => 'Url', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/MakeSuperResolutionImage/MakeSuperResolutionImage5.png', - 'isFileTransferUrl' => true, - 'required' => true, - 'type' => 'string', - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n" + .'Input limits:'."\n" + .'- Image format: JPEG, JPG, PNG, BMP, WEBP, or HEIC.'."\n" + .'- Image size: Up to 5 MB.'."\n" + .'- Image resolution: At least 32 × 32 pixels. The long side cannot exceed 1920 pixels, and the short side cannot exceed 1080 pixels.'."\n" + .'- The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/MakeSuperResolutionImage/MakeSuperResolutionImage5.png', 'title' => ''], ], [ 'name' => 'Mode', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'base', - 'required' => false, - 'type' => 'string', - 'default' => 'base', - ], + 'schema' => ['description' => 'The image output mode. Default value: `base`. Valid values:'."\n" + ."\n" + .'- base: normal mode, which provides stable super-resolution effects.'."\n" + .'- enhancement: enhancement mode, which provides more prominent enhancement effects compared to normal mode, further improving the clarity and sharpness of the output image.'."\n" + ."\n\n" + .'> This field is deprecated. The mode value does not affect the super-resolution result.', 'type' => 'string', 'default' => 'base', 'required' => false, 'example' => 'base', 'title' => ''], ], [ 'name' => 'UpscaleFactor', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '2', - 'format' => 'int64', - 'required' => false, - 'type' => 'integer', - 'default' => '2', - ], + 'schema' => ['description' => 'The upscaling factor. Valid values: 1, 2, 3, and 4. Default value: 2.', 'type' => 'integer', 'format' => 'int64', 'default' => '2', 'required' => false, 'example' => '2', 'title' => ''], ], [ 'name' => 'OutputFormat', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => 'png', - 'required' => false, - 'type' => 'string', - ], + 'schema' => ['description' => 'The storage format of the output image. Valid values: `png`, `jpg`, and `bmp`. Default value: `jpg`.'."\n" + ."\n" + .'> - If the input image is in RGBA format, the output format is forced to `png` to preserve the RGBA format and the accuracy of the alpha channel.'."\n" + .'- If the output image resolution exceeds 3840 × 2160, the output format is automatically set to `jpg`.', 'type' => 'string', 'required' => false, 'example' => 'png', 'title' => ''], ], [ 'name' => 'OutputQuality', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'example' => '95', - 'format' => 'int64', - 'required' => false, - 'type' => 'integer', - ], + 'schema' => ['description' => 'The quality factor of the output image. A higher value indicates higher quality. Valid values: \\[30,100]. Default value: 95. This parameter takes effect only when **OutputFormat** is set to `jpg`.', 'type' => 'integer', 'format' => 'int64', 'required' => false, 'example' => '95', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ + 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'example' => '47DD87F1-D077-499A-8D96-C82F006A6839', - 'type' => 'string', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '47DD87F1-D077-499A-8D96-C82F006A6839', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', + 'type' => 'object', 'properties' => [ - 'Url' => [ - 'description' => '', - 'example' => 'http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/ai-gateway_prod/ds%253D20191121/sisrx2_157433961551387538.jpg?Expires=1574598816&OSSAccessKeyId=LTAI4FeJ8qKkYn6SrHhQ****&Signature=8phY6dOz4U889nHfHC1g51nwAi****', - 'type' => 'string', - ], + 'Url' => ['description' => 'The URL of the image with enhanced resolution.'."\n" + .'> This URL is a temporary address that is valid for 30 minutes. After it expires, the URL becomes inaccessible. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/ai-gateway_prod/ds%253D20191121/sisrx2_157433961551387538.jpg?Expires=1574598816&OSSAccessKeyId=LTAI****************&Signature=8phY6dOz4U889nHfHC1g51nwAi****', 'title' => ''], ], - 'type' => 'object', + 'title' => '', + 'example' => '', ], ], - 'type' => 'object', + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"47DD87F1-D077-499A-8D96-C82F006A6839\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/ai-gateway_prod/ds%253D20191121/sisrx2_157433961551387538.jpg?Expires=1574598816&OSSAccessKeyId=LTAI****************&Signature=8phY6dOz4U889nHfHC1g51nwAi****\\"\\n }\\n}","type":"json"}]', + 'title' => 'Image super-resolution', + 'summary' => 'Enhances image resolution and clarity through super-resolution.', + 'description' => '## Feature description'."\n" + .'Image super-resolution enlarges image resolution while enhancing image detail and texture, and reducing image noise. It supports 1x to 4x resolution upscaling, original resolution enhancement, and multiple modes for different output effects.'."\n" + .'The following figures show examples of this feature:'."\n" + ."\n" + .'See the following figures.'."\n" + ."\n" + .'- Input image'."\n" + .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/chfc/MakeSuperResolutionImage.png" width="200)'."\n" + .'- Normal mode output'."\n" + .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/alaz/MakeSuperResolutionImagebase.png" width="500)'."\n" + .'- Enhancement mode output'."\n" + .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/lxhd/MakeSuperResolutionImagezengqiang.png" width="500)'."\n" + ."\n" + .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for assistance.'."\n" + .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=MakeSuperResolutionImage) to experience this feature or purchase it online.'."\n" + .'- For questions about API access, usage, or consultation regarding the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Common scenarios'."\n" + .'- Design asset optimization: Optimizes design asset images for subsequent design and production workflows.'."\n" + .'- Photo clarity enhancement: Enhances the clarity of previously captured photos.'."\n" + ."\n" + .'## Advantages'."\n" + .'- Outstanding results: Multiple enhancement modes provide differentiated super-resolution effects for different image assets.'."\n" + .'- Multiple upscaling factors: Supports 2x to 4x resolution upscaling and original resolution enhancement output. Select the appropriate factor based on your business requirements.'."\n" + ."\n" + .'## Getting started'."\n" + .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to complete registration.'."\n" + .'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/MakeSuperResolutionImage?lang=JAVA&sdkStyle=dara¶ms={%22Url%22:%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FMakeSuperResolutionImage%2FMakeSuperResolutionImage1.png%22,%22Mode%22:%22base%22,%22UpscaleFactor%22:2}&tab=DEBUG) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development and integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find and install the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation.'."\n" + .'- Modify the sample code provided in the references as needed and invoke the API.'."\n" + ."\n" + .'6. Sample code: For sample code in common programming languages, see [Image super resolution sample code](~~601502~~).'."\n" + ."\n" + .'7. Direct client calls: Common client call methods for this feature include the following.'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + .'- Image format: JPEG, JPG, PNG, BMP, WEBP, or HEIC.'."\n" + .'- Image size: Up to 5 MB.'."\n" + .'- Image resolution: At least 32 × 32 pixels. The long side cannot exceed 1920 pixels, and the short side cannot exceed 1080 pixels.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For the billable methods and pricing of image super resolution, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging API below is a paid API. For a free trial, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=MakeSuperResolutionImage).', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'For the image super-resolution feature under the Alibaba Cloud Visual AI Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the SDK, select the SDK package for the Image Production (imageenhan) AI category. The SDK supports local files and arbitrary URLs for file parameters. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in common programming languages, see [Image super-resolution sample code](~~601502~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of image super-resolution, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Ensure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-06-20T02:51:39.000Z', 'description' => 'Request parameters changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'MakeSuperResolutionImage'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:MakeSuperResolutionImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"47DD87F1-D077-499A-8D96-C82F006A6839\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/ai-gateway_prod/ds%253D20191121/sisrx2_157433961551387538.jpg?Expires=1574598816&OSSAccessKeyId=LTAI****************&Signature=8phY6dOz4U889nHfHC1g51nwAi****\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"\\n 47DD87F1-D077-499A-8D96-C82F006A6839\\n \\n http://ivpd-cn-shanghai.oss-cn-shanghai.aliyuncs.com/upload/ai-gateway_prod/ds%253D20191121/sisrx2_157433961551387538.jpg?Expires=1574598816&OSSAccessKeyId=LTAI****************&Signature=8phY6dOz4U889nHfHC1g51nwAi****\\n \\n","errorExample":""}]', - 'requestParamsDescription' => ' ', ], - 'GetAsyncJobResult' => [ - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'RemoveImageSubtitles' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], - 'operationType' => 'read', + 'operationType' => 'readAndWrite', 'deprecated' => false, - 'systemTags' => [ - 'operationType' => 'get', - ], + 'systemTags' => [], 'parameters' => [ [ - 'name' => 'JobId', + 'name' => 'ImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '11A898F7-29D7-4AB3-B639-8BBDE671BBD5', - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n" + ."\n" + .'> The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RemoveImageSubtitles/RemoveImageSubtitles1.jpg', 'title' => ''], + ], + [ + 'name' => 'BX', + 'in' => 'formData', + 'schema' => ['description' => 'The ratio of the x-coordinate of the upper-left corner of the subtitle area to the image width. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '0', 'title' => ''], + ], + [ + 'name' => 'BY', + 'in' => 'formData', + 'schema' => ['description' => 'The ratio of the y-coordinate of the upper-left corner of the subtitle area to the image height. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '0.75', 'title' => ''], + ], + [ + 'name' => 'BW', + 'in' => 'formData', + 'schema' => ['description' => 'The ratio of the width of the subtitle area to the image width. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '1', 'title' => ''], + ], + [ + 'name' => 'BH', + 'in' => 'formData', + 'schema' => ['description' => 'The ratio of the height of the subtitle area to the image height. Valid values: 0 to 1.', 'type' => 'number', 'format' => 'float', 'required' => false, 'example' => '0.25', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'description' => '1', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'type' => 'string', - 'example' => '6B4B827E-1CAA-43CD-BBDF-BB572E035976', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '939B2103-EE28-4F2D-9773-9A37AD00E5B7', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', 'type' => 'object', 'properties' => [ - 'Status' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'PROCESS_SUCCESS', - ], - 'ErrorMessage' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'paramsIllegal', - ], - 'Result' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'http://viapi-cn-shanghai-dha-filter.oss-cn-shanghai.aliyuncs.com/upload/recoloring-hd-2020-06-22-19-39-25-798c9cb57f-v6pj4/2020-6-23/invi_filter_015928997797691000043_tIPX7W.jpg?Expires=1592901579&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=qelgcQJBnzRogPybEPDDrDIjHd****', - ], - 'ErrorCode' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'InvalidParameter', - ], - 'JobId' => [ - 'description' => '', - 'type' => 'string', - 'example' => '7435839A-5B92-4AA1-B2DE-5B6C98C04DDE', - ], + 'ImageURL' => ['description' => 'The URL of the output image with subtitles removed.'."\n" + .'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes and download the file to your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-desubtitle/2020-03-23-08/02%3A50-e8af2ea3-bddc-4ec8-b21c-493ee687465e.jpg?Expires=1584952370&OSSAccessKeyId=LTAI****************&Signature=qVnfWZJ2QtI9NRWQ410FsEFioq****', 'title' => ''], ], + 'title' => '', + 'example' => '', ], ], + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"939B2103-EE28-4F2D-9773-9A37AD00E5B7\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-desubtitle/2020-03-23-08/02%3A50-e8af2ea3-bddc-4ec8-b21c-493ee687465e.jpg?Expires=1584952370&OSSAccessKeyId=LTAI****************&Signature=qVnfWZJ2QtI9NRWQ410FsEFioq****\\"\\n }\\n}","type":"json"}]', + 'title' => 'Subtitle removal', + 'summary' => 'This topic describes the syntax and examples of the subtitle removal feature (RemoveImageSubtitles).', + 'description' => '## Feature description'."\n" + .'The subtitle removal feature can remove standard subtitles from images.'."\n" + ."\n" + .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get online help.'."\n" + .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=RemoveImageSubtitles) to experience this feature or purchase it online.'."\n" + .'- For questions about API integration and usage of Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Integration guide'."\n" + .'1. Register an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Register Now** in the upper-right corner, and follow the instructions to complete registration.'."\n" + .'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey: Make sure you have [created an AccessKey](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/RemoveImageSubtitles?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FRemoveImageSubtitles%2FRemoveImageSubtitles1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the References as needed and invoke the API.'."\n" + ."\n" + .'6. Sample code: For sample code in commonly used languages, see [Subtitle removal sample code](~~601539~~).'."\n" + ."\n" + .'7. Direct client calls: Common client call methods for this feature include the following.'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + ."\n" + .'- Image format: JPG, JPEG, BMP, or PNG.'."\n" + .'- Image size: up to 3 MB.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For information about the billable methods and pricing of subtitle removal, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The API operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=RemoveImageSubtitles). The debug interface is a paid interface.', + 'requestParamsDescription' => '> If you do not specify these parameters, bx, by, bw, and bh default to the bottom area of the video: bx=0, by=0.75, bw=1, bh=0.25.', + 'responseParamsDescription' => '## SDK reference'."\n" + .'We recommend that you use an SDK to call the subtitle removal feature under the Visual AI Image Production category. Multiple programming languages are supported. Select the SDK package for the Image Production (imageenhan) AI category. File parameters support local files and URLs of any region when called through the SDK. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in commonly used languages, see [Subtitle removal sample code](~~601539~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of the subtitle removal feature, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the experience debugging feature are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RemoveImageSubtitles'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:RemoveImageSubtitles', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"6B4B827E-1CAA-43CD-BBDF-BB572E035976\\",\\n \\"Data\\": {\\n \\"Status\\": \\"PROCESS_SUCCESS\\",\\n \\"ErrorMessage\\": \\"paramsIllegal\\",\\n \\"Result\\": \\"http://viapi-cn-shanghai-dha-filter.oss-cn-shanghai.aliyuncs.com/upload/recoloring-hd-2020-06-22-19-39-25-798c9cb57f-v6pj4/2020-6-23/invi_filter_015928997797691000043_tIPX7W.jpg?Expires=1592901579&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=qelgcQJBnzRogPybEPDDrDIjHd****\\",\\n \\"ErrorCode\\": \\"InvalidParameter\\",\\n \\"JobId\\": \\"7435839A-5B92-4AA1-B2DE-5B6C98C04DDE\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"6B4B827E-1CAA-43CD-BBDF-BB572E035976\\n\\n PROCESS_SUCCESS\\n 7435839A-5B92-4AA1-B2DE-5B6C98C04DDE\\n {\\"ImageList\\":[\\"http://viapi-cn-shanghai-dha-filter.oss-cn-shanghai.aliyuncs.com/upload/recoloring-hd-2020-06-22-19-39-25-798c9cb57f-v6pj4/2020-6-23/invi_filter_015928997797691000043_tIPX7W.jpg?Expires=1592901579&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=qelgcQJBnzRogPybEPDDrDIjHd****\\"]}\\n","errorExample":""}]', - 'requestParamsDescription' => ' ', ], - 'GenerateCartoonizedImage' => [ - 'summary' => '生成式图像卡通化', - 'methods' => [ - 'post', - ], - 'schemes' => [ - 'http', - 'https', - ], + 'RemoveImageWatermark' => [ + 'methods' => ['post'], + 'schemes' => ['http', 'https'], 'security' => [ [ 'AK' => [], ], ], + 'operationType' => 'readAndWrite', 'deprecated' => false, 'systemTags' => [], 'parameters' => [ [ - 'name' => 'ImageUrl', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test-team/zhangchaorun/1025.jpg', - 'isFileTransferUrl' => true, - ], - ], - [ - 'name' => 'ImageType', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => 'girl', - ], - ], - [ - 'name' => 'Index', + 'name' => 'ImageURL', 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => '0', - ], + 'schema' => ['description' => 'The URL of the image. We recommend that you use an OSS URL in the Shanghai region. If the file is stored locally or in an OSS bucket outside the Shanghai region, see [File URL processing](~~155645~~).'."\n" + ."\n" + .'> The URL cannot contain Chinese characters.', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imageenhan/RemoveImageWatermark/RemoveImageWatermark3.jpg', 'title' => ''], ], ], 'responses' => [ 200 => [ 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', 'type' => 'object', 'properties' => [ - 'RequestId' => [ - 'description' => '', - 'type' => 'string', - 'example' => '48f38719-f0c2-4784-a9cc-30df95e393a9', - ], + 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '885070A7-E721-4062-99A0-80C0EBBF9406', 'title' => ''], 'Data' => [ - 'description' => '', + 'description' => 'The returned data.', 'type' => 'object', 'properties' => [ - 'ResultUrl' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/generative-cartoon/2023-02-02/5a3e5760-ff27-4321-8976-d05656fb716a/20230202_154009511910_pclb0gomva.jpg?Expires=1675325422&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=UmAa7HxeumVkDfrdoL02dtztwS****', - ], + 'ImageURL' => ['description' => 'The URL of the result image after logo removal.'."\n" + .'> This URL is a temporary URL that is valid for 30 minutes. After it expires, the URL is no longer accessible. To save the file for a longer period or permanently, access the URL within 30 minutes, download the file, and store it in your own OSS bucket or other storage.', 'type' => 'string', 'example' => 'http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-delogo/2020-03-27-03/00%3A06-5a6f0a0f-c940-4955-af75-79e8267f1699.jpg?Expires=1585279806&OSSAccessKeyId=LTAI****************&Signature=R4OC2R5%2Fkw08XYFXmCWjgk7Y9N****', 'title' => ''], ], - ], - 'Message' => [ - 'description' => '', - 'type' => 'string', + 'title' => '', 'example' => '', ], ], + 'description' => '', + 'title' => '', + 'example' => '', ], ], ], 'errorCodes' => [ 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', - ], + ['errorCode' => 'ParameterError', 'errorMessage' => 'The parameter is invalid. Please check again.', 'description' => ''], ], 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', - ], + ['errorCode' => 'AuthFailed', 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'description' => ''], ], 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', - ], + ['errorCode' => 'Timeout', 'errorMessage' => 'The request has timed out.', 'description' => ''], ], 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ['errorCode' => 'ServiceUnavailable', 'errorMessage' => 'The service is unavailable.', 'description' => ''], + ], + ], + 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"885070A7-E721-4062-99A0-80C0EBBF9406\\",\\n \\"Data\\": {\\n \\"ImageURL\\": \\"http://algo-app-aic-vd-cn-shanghai-prod.oss-cn-shanghai.aliyuncs.com/image-delogo/2020-03-27-03/00%3A06-5a6f0a0f-c940-4955-af75-79e8267f1699.jpg?Expires=1585279806&OSSAccessKeyId=LTAI****************&Signature=R4OC2R5%2Fkw08XYFXmCWjgk7Y9N****\\"\\n }\\n}","type":"json"}]', + 'title' => 'Remove image logos', + 'summary' => 'Describes the syntax and provides examples for the RemoveImageWatermark operation for image logo removal.', + 'description' => '## Feature description'."\n" + .'The image logo removal feature removes common logos from images, such as TV channel logos and Internet platform logos.'."\n" + ."\n" + .'> - You can join [online consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) to get help from online support.'."\n" + .'- You can try this feature for free on the Visual Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=RemoveImageWatermark) to try this feature or purchase it online.'."\n" + .'- To get help with API integration, usage, or other questions about the Alibaba Cloud Visual Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n" + ."\n" + .'## Getting started'."\n" + .'1. Create an Alibaba Cloud account: Go to the [Alibaba Cloud official website](https://www.aliyun.com), click **Sign Up** in the upper-right corner, and follow the instructions to create an account.'."\n" + .'2. Activate the service: Make sure you have activated the [Image Production service](https://vision.aliyun.com/imageenhan). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imageenhan_public_cn#/open).'."\n" + .'3. Create an AccessKey pair: Make sure you have [created an AccessKey pair](~~175144~~). If you are using a RAM user AccessKey, grant the AliyunVIAPIFullAccess permission to the RAM user. For more information, see [RAM authorization](~~145025~~).'."\n" + .'4. Online debugging (optional): You can use [OpenAPI Explorer](https://next.api.aliyun.com/api/imageenhan/2019-09-30/RemoveImageWatermark?lang=JAVA&sdkStyle=dara¶ms=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimageenhan%2FRemoveImageWatermark%2FRemoveImageWatermark1.jpg%22%7D&tab=DEMO) to debug this feature online, view complete sample code and SDK dependency information, or download the complete project.'."\n" + .'5. Development integration steps:'."\n" + .'- Select the SDK language you want to use from the [SDK overview](~~145033~~).'."\n" + .'- Find the SDK package for the Image Production (imageenhan) AI category in the corresponding SDK documentation and install it.'."\n" + .'- Modify the sample code provided in the References as needed and invoke the operation.'."\n" + ."\n" + .'6. Sample code: For sample code in common programming languages, see [Image flag removal sample code](~~601564~~).'."\n" + ."\n" + .'7. Direct client calls: Common client call methods for this feature include the following.'."\n" + .'- [Direct call from web frontend](~~467779~~)'."\n" + .'- [Direct call from mini programs](~~467780~~)'."\n" + .'- [Direct call from Android](~~467781~~)'."\n" + .'- [Direct call from iOS](~~467782~~).'."\n" + ."\n" + .'## Input limits'."\n" + ."\n" + .'- Image format: JPG, JPEG, BMP, PNG, or WEBP.'."\n" + .'- Image size: up to 3 MB.'."\n" + .'- The URL cannot contain Chinese characters.'."\n" + ."\n" + .'## Billing description'."\n" + .'For the billable methods and pricing of image flag removal, see [Billing overview](~~202482~~).'."\n" + ."\n" + .'> The debugging operation below is a paid operation. To try it for free, go to the [Experience Center](https://vision.aliyun.com/experience/detail?&tagName=imageenhan&children=RemoveImageWatermark).', + 'requestParamsDescription' => ' ', + 'responseParamsDescription' => '## SDK reference'."\n" + .'For the image logo removal feature under the Visual AI Image Production category, we recommend that you use the SDK. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the Image Production (imageenhan) AI category. File parameters passed through the SDK support both local files and URLs. For more information, see [SDK overview](~~145033~~).'."\n" + ."\n" + .'## Sample code'."\n" + .'For sample code in common programming languages, see [Image logo removal sample code](~~601564~~).', + 'extraInfo' => '## Error codes'."\n" + .'For error codes of image logo removal, see [Common error codes](~~145023~~).'."\n" + ."\n" + .'## Security notice'."\n" + .'- Make sure that the uploaded images or files comply with applicable laws and regulations.'."\n" + .'- Temporary files uploaded through the debugging experience are valid for 1 hour and are automatically deleted by the system after 24 hours.', + 'changeSet' => [ + ['createdAt' => '2022-03-30T03:15:40.000Z', 'description' => 'Error codes changed'], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RemoveImageWatermark'], + ], + ], + 'ramActions' => [ + [ + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:RemoveImageWatermark', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', + ], + ], + 'endpoints' => [ + ['regionId' => 'cn-shanghai', 'regionName' => 'China (Shanghai)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'imageenhan.cn-shanghai.aliyuncs.com', 'endpoint' => 'imageenhan.cn-shanghai.aliyuncs.com', 'vpc' => 'imageenhan-vpc.cn-shanghai.aliyuncs.com'], + ], + 'errorCodes' => [], + 'changeSet' => [ + [ + 'apis' => [ + ['description' => 'Response parameters changed', 'api' => 'GenerateImageWithTextAndImage'], + ['description' => 'Response parameters changed', 'api' => 'GenerateSuperResolutionImage'], ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"48f38719-f0c2-4784-a9cc-30df95e393a9\\",\\n \\"Data\\": {\\n \\"ResultUrl\\": \\"http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/generative-cartoon/2023-02-02/5a3e5760-ff27-4321-8976-d05656fb716a/20230202_154009511910_pclb0gomva.jpg?Expires=1675325422&OSSAccessKeyId=LTAI****************&Signature=UmAa7HxeumVkDfrdoL02dtztwS****\\"\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 48f38719-f0c2-4784-a9cc-30df95e393a9\\n 该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\n","errorExample":""}]', + 'createdAt' => '2024-02-20T02:48:46.000Z', + 'description' => '', ], - 'GenerateSuperResolutionImage' => [ - 'summary' => '生成式图像超分', - 'methods' => [ - 'post', + [ + 'apis' => [ + ['description' => 'Response parameters changed', 'api' => 'GenerateCartoonizedImage'], ], - 'schemes' => [ - 'http', - 'https', + 'createdAt' => '2024-02-20T02:45:47.000Z', + 'description' => '', + ], + [ + 'apis' => [ + ['description' => 'Request parameters changed', 'api' => 'GenerateCartoonizedImage'], ], - 'security' => [ - [ - 'AK' => [], - ], + 'createdAt' => '2023-12-27T06:30:21.000Z', + 'description' => '', + ], + [ + 'apis' => [ + ['description' => 'Request parameters changed', 'api' => 'ImitatePhotoStyle'], ], - 'deprecated' => false, - 'systemTags' => [], - 'parameters' => [ - [ - 'name' => 'ImageUrl', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => true, - 'example' => 'https://viapi-test.oss-cn-shanghai.aliyuncs.com/test/xxx/1025.jpg', - 'isFileTransferUrl' => true, + 'createdAt' => '2022-12-14T07:02:51.000Z', + 'description' => '更改入参支持本地文件上传', + ], + [ + 'apis' => [ + ['description' => 'Request parameters changed', 'api' => 'ErasePerson'], + ], + 'createdAt' => '2022-12-09T07:28:02.000Z', + 'description' => '支持ErasePerson的UserMask字段本地上传', + ], + [ + 'apis' => [ + ['description' => 'Response parameters changed', 'api' => 'RecolorHDImage'], + ], + 'createdAt' => '2022-10-17T02:06:53.000Z', + 'description' => '修改异步任务Message为可见', + ], + [ + 'apis' => [ + ['description' => 'Request parameters changed', 'api' => 'ExtendImageStyle'], + ['description' => 'Request parameters changed', 'api' => 'ImageBlindCharacterWatermark'], + ['description' => 'Request parameters changed', 'api' => 'ImageBlindPicWatermark'], + ['description' => 'Request parameters changed', 'api' => 'RecolorImage'], + ], + 'createdAt' => '2022-09-29T07:58:31.000Z', + 'description' => '多url参数支持本地文件上传', + ], + [ + 'apis' => [ + ['description' => 'Request parameters changed', 'api' => 'MakeSuperResolutionImage'], + ], + 'createdAt' => '2022-06-20T02:52:08.000Z', + 'description' => '新增入参参数', + ], + [ + 'apis' => [ + ['description' => 'Error codes changed', 'api' => 'AssessComposition'], + ['description' => 'Error codes changed', 'api' => 'AssessExposure'], + ['description' => 'Error codes changed', 'api' => 'ChangeImageSize'], + ], + 'createdAt' => '2022-05-06T10:48:27.000Z', + 'description' => '调整用户调用频率', + ], + [ + 'apis' => [ + ['description' => 'Error codes changed', 'api' => 'GetAsyncJobResult'], + ], + 'createdAt' => '2022-04-24T08:16:49.000Z', + 'description' => '调整GetAsyncJobResult单用户调用频率', + ], + [ + 'apis' => [ + ['description' => 'Error codes changed', 'api' => 'EnhanceImageColor'], + ['description' => 'Error codes changed', 'api' => 'ExtendImageStyle'], + ['description' => 'Error codes changed', 'api' => 'ImageBlindCharacterWatermark'], + ['description' => 'Error codes changed', 'api' => 'ImageBlindPicWatermark'], + ['description' => 'Error codes changed', 'api' => 'ImitatePhotoStyle'], + ['description' => 'Error codes changed', 'api' => 'IntelligentComposition'], + ['description' => 'Error codes changed', 'api' => 'RecolorImage'], + ['description' => 'Error codes changed', 'api' => 'RemoveImageSubtitles'], + ['description' => 'Error codes changed', 'api' => 'RemoveImageWatermark'], + ], + 'createdAt' => '2022-03-30T09:08:05.000Z', + 'description' => '调整用户调用频率', + ], + [ + 'apis' => [ + ['description' => 'Error codes changed', 'api' => 'RecolorHDImage'], + ], + 'createdAt' => '2022-03-30T09:07:53.000Z', + 'description' => '调整用户调用频率', + ], + [ + 'apis' => [ + ['description' => 'OpenAPI offline', 'api' => 'AssessSharpness'], + ], + 'createdAt' => '2021-06-22T08:17:22.000Z', + 'description' => 'api调用频率1000, 单用户频率100', + ], + ], + 'flowControl' => [ + 'flowControlList' => [ + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ExtendImageStyle'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GenerateCartoonizedImage'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImageBlindCharacterWatermark'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GenerateSuperResolutionImage'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RemoveImageWatermark'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImageBlindPicWatermark'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RemoveImageSubtitles'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecolorHDImage'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ColorizeImage'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecolorImage'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessComposition'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessSharpness'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ErasePerson'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ImitatePhotoStyle'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeImageSize'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'EnhanceImageColor'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'AssessExposure'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'MakeSuperResolutionImage'], + ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'IntelligentComposition'], + ], + ], + 'ram' => [ + 'productCode' => 'VisualIntelligenceAPI', + 'productName' => 'Visual Intelligence API', + 'ramCodes' => ['viapi-imageseg', 'viapi-imageaudit', 'viapi-ocr', 'viapi-objectdet', 'viapi-imageenhan', 'viapi-videorecog', 'viapi-imageprocess', 'viapi', 'viapi-ekyc', 'viapi-imgsearch', 'viapi-goodstech', 'viapi-facebody', 'viapi-threedvision', 'viapi-videoenhan', 'viapi-imagerecog', 'viapi-videoseg', 'viapi-regen', 'viapi-aigen'], + 'ramLevel' => 'SERVICE', + 'ramConditions' => [], + 'ramActions' => [ + [ + 'apiName' => 'AssessSharpness', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:AssessSharpness', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'ColorizeImage', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ColorizeImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'ImageBlindCharacterWatermark', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ImageBlindCharacterWatermark', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GenerateSuperResolutionImage', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:GenerateSuperResolutionImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'RemoveImageWatermark', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:RemoveImageWatermark', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'AssessExposure', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:AssessExposure', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'ImitatePhotoStyle', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ImitatePhotoStyle', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'RecolorHDImage', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:RecolorHDImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'EnhanceImageColor', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:EnhanceImageColor', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'ImageBlindPicWatermark', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ImageBlindPicWatermark', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], + ], + ], + ], + [ + 'apiName' => 'GetAsyncJobResult', + 'description' => '', + 'operationType' => 'get', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:GetAsyncJobResult', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'Scale', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => '2', + ], + [ + 'apiName' => 'MakeSuperResolutionImage', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:MakeSuperResolutionImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'UserData', - 'in' => 'formData', - 'schema' => [ - 'type' => 'string', + ], + [ + 'apiName' => 'AssessComposition', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:AssessComposition', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'OutputFormat', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'string', - 'required' => false, - 'example' => '95', + ], + [ + 'apiName' => 'ChangeImageSize', + 'description' => '', + 'operationType' => 'update', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ChangeImageSize', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - [ - 'name' => 'OutputQuality', - 'in' => 'formData', - 'schema' => [ - 'description' => '', - 'type' => 'integer', - 'format' => 'int32', - 'required' => false, - 'example' => 'jpg', + ], + [ + 'apiName' => 'RemoveImageSubtitles', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:RemoveImageSubtitles', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'responses' => [ - 200 => [ - 'schema' => [ - 'title' => 'Schema of Response', - 'description' => 'Schema of Response', - 'type' => 'object', - 'properties' => [ - 'RequestId' => [ - 'title' => 'Id of the request', - 'description' => '', - 'type' => 'string', - 'example' => '4ad5c3ef-5ac4-4e1c-b14f-90d939aa73eb', - ], - 'Data' => [ - 'description' => '', - 'type' => 'object', - 'properties' => [ - 'ResultUrl' => [ - 'description' => '', - 'type' => 'string', - 'example' => 'http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/diffusion-sr/2023-02-07/d01cede5-28bf-4719-96d9-77198d51c2f2/20230207_150650515242_3dbctnjy5f.jpg?Expires=1675755681&OSSAccessKeyId=LTAI4FoLmvQ9urWXgSRp****&Signature=4FeDXpp0DilXsHdt7qc%2Ffh3zoC****', - ], - ], - ], - 'Message' => [ - 'description' => '', - 'type' => 'string', - 'example' => '', - ], - ], + [ + 'apiName' => 'ExtendImageStyle', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ExtendImageStyle', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'errorCodes' => [ - 400 => [ - [ - 'errorCode' => 'ParameterError', - 'errorMessage' => 'The parameter is invalid. Please check again.', + [ + 'apiName' => 'IntelligentComposition', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:IntelligentComposition', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - 403 => [ - [ - 'errorCode' => 'AuthFailed', - 'errorMessage' => 'An error occurred while performing authorization. Please check your RAM configuration.', + ], + [ + 'apiName' => 'ErasePerson', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:ErasePerson', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - 408 => [ - [ - 'errorCode' => 'Timeout', - 'errorMessage' => 'The request has timed out.', + ], + [ + 'apiName' => 'RecolorImage', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:RecolorImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], - 503 => [ - [ - 'errorCode' => 'ServiceUnavailable', - 'errorMessage' => 'The service is unavailable.', + ], + [ + 'apiName' => 'GenerateCartoonizedImage', + 'description' => '', + 'operationType' => '', + 'ramAction' => [ + 'action' => 'viapi-imageenhan:GenerateCartoonizedImage', + 'authLevel' => 'operate', + 'actionConditions' => [], + 'resources' => [ + ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'], ], ], ], - 'staticInfo' => [ - 'returnType' => 'synchronous', - ], - 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4ad5c3ef-5ac4-4e1c-b14f-90d939aa73eb\\",\\n \\"Data\\": {\\n \\"ResultUrl\\": \\"http://vibktprfx-prod-prod-damo-eas-cn-shanghai.oss-cn-shanghai.aliyuncs.com/diffusion-sr/2023-02-07/d01cede5-28bf-4719-96d9-77198d51c2f2/20230207_150650515242_3dbctnjy5f.jpg?Expires=1675755681&OSSAccessKeyId=LTAI****************&Signature=4FeDXpp0DilXsHdt7qc%2Ffh3zoC****\\"\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","errorExample":""},{"type":"xml","example":"\\n 4ad5c3ef-5ac4-4e1c-b14f-90d939aa73eb\\n 该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\n","errorExample":""}]', - ], - ], - 'endpoints' => [ - [ - 'regionId' => 'cn-shanghai', - 'endpoint' => 'imageenhan.cn-shanghai.aliyuncs.com', ], + 'resourceTypes' => [], ], ]; -- cgit v1.2.3