summaryrefslogtreecommitdiff
path: root/data/en_us/imagerecog/2019-09-30
diff options
context:
space:
mode:
authorZhineng Li <im@zhineng.li>2026-07-12 17:11:17 +0800
committerZhineng Li <im@zhineng.li>2026-07-12 17:11:17 +0800
commit1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634 (patch)
tree5f0857666365b7e40cdaa3733ebe1f3ba9e13c67 /data/en_us/imagerecog/2019-09-30
parent7347bac4ab7e136157fc94777e6cf87ef9e08599 (diff)
downloadafterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.tar.gz
afterglow-metadata-full-1c7f908ce09f98fdcbf79ed2a8ae21be60eaa634.zip
update APIs 20260712
Diffstat (limited to 'data/en_us/imagerecog/2019-09-30')
-rw-r--r--data/en_us/imagerecog/2019-09-30/api-docs.php1894
1 files changed, 1174 insertions, 720 deletions
diff --git a/data/en_us/imagerecog/2019-09-30/api-docs.php b/data/en_us/imagerecog/2019-09-30/api-docs.php
index 5568863..13bfe1b 100644
--- a/data/en_us/imagerecog/2019-09-30/api-docs.php
+++ b/data/en_us/imagerecog/2019-09-30/api-docs.php
@@ -1,62 +1,35 @@
<?php return [
'version' => '1.0',
- 'info' => [
- 'style' => 'RPC',
- 'product' => 'imagerecog',
- 'version' => '2019-09-30',
- ],
+ 'info' => ['style' => 'RPC', 'product' => 'imagerecog', 'version' => '2019-09-30'],
'directories' => [
[
- 'id' => 64348,
- 'title' => null,
+ 'children' => ['EvaluateCertificateQuality'],
'type' => 'directory',
- 'children' => [
- 'GetAsyncJobResult',
- 'EvaluateCertificateQuality',
- ],
+ 'title' => 'Results',
],
[
- 'id' => 64351,
- 'title' => null,
+ 'children' => ['TaggingImage'],
'type' => 'directory',
- 'children' => [
- 'TaggingImage',
- ],
+ 'title' => 'Annotation',
],
[
- 'id' => 64353,
- 'title' => null,
+ 'children' => ['ClassifyingRubbish', 'DetectImageElements', 'RecognizeImageColor', 'RecognizeImageStyle', 'RecognizeScene'],
'type' => 'directory',
- 'children' => [
- 'ClassifyingRubbish',
- 'DetectImageElements',
- 'RecognizeFood',
- 'RecognizeImageColor',
- 'RecognizeImageStyle',
- 'RecognizeScene',
- ],
+ 'title' => 'Recognition',
],
[
- 'id' => 0,
- 'title' => '其它',
+ 'children' => ['GetAsyncJobResult', 'TaggingAdImage'],
+ 'title' => 'Others',
'type' => 'directory',
- 'children' => [
- 'TaggingAdImage',
- ],
],
],
'components' => [
'schemas' => [],
],
'apis' => [
- 'GetAsyncJobResult' => [
- 'methods' => [
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'ClassifyingRubbish' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -64,217 +37,311 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'get',
- ],
+ 'systemTags' => [],
'parameters' => [
[
- 'name' => 'JobId',
- 'in' => 'query',
- 'schema' => [
- 'description' => '',
- 'type' => 'string',
- 'required' => true,
- 'example' => '72CFDC08-3FEF-56AA-91E5-B14DE31C09C2',
- ],
+ 'name' => 'ImageURL',
+ 'in' => 'formData',
+ '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/imagerecog/ClassifyingRubbish/ClassifyingRubbish6.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '1',
'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '572974F0-1014-5C60-97EE-DBFFC0FF7616',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '1619647E-92ED-5641-A1D9-F05C33FD294A', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
'type' => 'object',
'properties' => [
- 'Status' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'PROCESS_SUCCESS',
- ],
- 'ErrorMessage' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'paramsIllegal',
- ],
- 'Result' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '{\\"tags\\":[{\\"confidence\\":-1,\\"value\\":\\"{\\\\\\"tagInfo\\\\\\": {\\\\\\"humanInfo\\\\\\": [[{\\\\\\"category\\\\\\": \\\\\\"human-real-normal\\\\\\", \\\\\\"score\\\\\\": 0.9690580798778683, \\\\\\"bbox\\\\\\": [77, 280, 431, 569], \\\\\\"cloth_category\\\\\\": \\\\\\"modern\\\\\\", \\\\\\"cloth_category_score\\\\\\": 0.7393399477005005}]], \\\\\\"sceneInfo\\\\\\": [[{\\\\\\"category\\\\\\": \\\\\\"gamescreen-gameeffect\\\\\\", \\\\\\"score\\\\\\": 0.44200169294841274}]], \\\\\\"objectInfo\\\\\\": [null]}}\\"}]}',
- ],
- 'ErrorCode' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => 'InvalidParameter',
- ],
- 'JobId' => [
- 'description' => '',
- 'type' => 'string',
- 'example' => '72CFDC08-3FEF-56AA-91E5-B14DE31C09C2',
+ 'Sensitive' => ['description' => 'Indicates whether the image contains sensitive information.'."\n"
+ ."\n"
+ .'- true: The image contains sensitive information. Specific waste classification information is not returned.'."\n"
+ ."\n"
+ .'- false: The image does not contain sensitive information.', 'type' => 'boolean', 'example' => 'false', 'title' => ''],
+ 'Elements' => [
+ 'description' => 'The waste recognition results.',
+ 'type' => 'array',
+ 'items' => [
+ 'type' => 'object',
+ 'properties' => [
+ 'CategoryScore' => ['description' => 'The confidence score of the recognized waste category.', 'type' => 'number', 'format' => 'float', 'example' => '0.9406', 'title' => ''],
+ 'Rubbish' => ['description' => 'The specific item name.', 'type' => 'string', 'example' => '纸板箱', 'title' => ''],
+ 'RubbishScore' => ['description' => 'The confidence score of the item name.', 'type' => 'number', 'format' => 'float', 'example' => '0.9406', 'title' => ''],
+ 'Category' => ['description' => 'The waste category. Valid values: 可回收垃圾 (recyclable waste), 干垃圾 (dry waste), 湿垃圾 (wet waste), and 有害垃圾 (hazardous waste).', 'type' => 'string', 'example' => '可回收垃圾', 'title' => ''],
+ ],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
+ ],
+ 'title' => '',
+ 'example' => '',
],
],
+ '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\\": \\"1619647E-92ED-5641-A1D9-F05C33FD294A\\",\\n \\"Data\\": {\\n \\"Sensitive\\": false,\\n \\"Elements\\": [\\n {\\n \\"CategoryScore\\": 0.9406,\\n \\"Rubbish\\": \\"纸板箱\\",\\n \\"RubbishScore\\": 0.9406,\\n \\"Category\\": \\"可回收垃圾\\"\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Waste classification and recognition',
+ 'summary' => 'Describes the syntax and provides examples for the ClassifyingRubbish operation.',
+ 'description' => '## Feature description'."\n"
+ .'The waste classification and recognition feature classifies waste items in images and returns specific item names.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- You can try this feature for free on the Vision Intelligence platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imagerecog&children=ClassifyingRubbish) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration or usage of Alibaba Cloud Vision Intelligence 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 recognition service](https://vision.aliyun.com/imagerecog). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imagerecog_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/imagerecog/2019-09-30/ClassifyingRubbish?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimagerecog%2FClassifyingRubbish%2FClassifyingRubbish1.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 recognition (imagerecog) AI 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 common programming languages, see [Waste categorization sample code](~~601145~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client invocation 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 type: JPEG, JPG, or PNG.'."\n"
+ .'- Image size: up to 3 MB.'."\n"
+ .'- Image resolution: No limit on image resolution, but a very high resolution may cause the API to time out. The timeout period is 5 seconds.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For the billable methods and pricing of waste categorization and recognition, see [Billing overview](~~202481~~).'."\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=imagerecog&children=ClassifyingRubbish).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## Common waste output values'."\n"
+ .'- 湿垃圾 (Wet waste):'."\n"
+ .'八宝粥,冰激凌,冰糖葫芦,饼干,菠萝,菠萝蜜,菜根菜叶,残渣剩饭,草莓,茶叶,肠,橙子,蛋,蛋糕,蛋挞,地瓜,豆,豆腐,番茄,粉条,甘蔗,骨头,瓜子,果冻,果壳,果皮,哈密瓜,核桃,火龙果,火腿,鸡翅,坚果,秸秆杯,秸秆碗,咖啡,烤鸡,辣椒,梨,萝卜,面包,蘑菇,泡菜,苹果,巧克力,肉类,圣女果,蔬菜,薯片,薯条,水果,蒜,鱼骨。'."\n"
+ ."\n"
+ .'- 可回收垃圾 (Recyclable waste):'."\n"
+ .'包,保温杯,保鲜膜内芯,玻璃壶,玻璃瓶,玻璃器皿,玻璃球,玻璃制品,不锈钢制品,布制品,餐垫,餐具,插头电线,插线板,尺子,充电宝,充电头,充电线,充电牙刷,吹风机,磁铁,搓衣板,打包绳,打气筒,打印机,单车,档案袋,刀,地球仪,地铁票,灯罩,登机牌,凳子,电磁炉,电动卷发棒,电动剃须刀,电饭煲,电风扇,电话,电路板,显示器,电视机,电熨斗,电子秤,垫子,吊牌,调料瓶,钉子,订书机,豆浆机,耳机,耳套,放大镜,盖子,购物纸袋,锅,锅盖,果冻杯,过滤网,盒子,呼啦圈,护肤品瓶,话筒,计算器,键盘,金属罐,金属制品,酒瓶,卡片,空气加湿器,空气净化器,裤子,快递纸袋,拉杆箱,量杯,笼子,路由器,铝制用品,轮胎,帽子,灭火器,模具,木雕,木棍,木桶,木制切菜板,木质锅铲,木质梳子,奶粉罐,闹铃,尼龙绳,镊子,暖宝宝,盘子,泡沫板,乒乓球拍,棋子,铅球,裙子,燃气瓶,燃气灶,热水瓶,日历,扫地机器人,沙发,食用油桶,饰品,收音机,手表,手电筒,手机,手链,书,鼠标,水杯,水壶,塑料碗盆,塑料制品,台灯,太阳能热水器,毯子,体重秤,铁丝球,拖鞋,袜子,玩具,碗,网卡,望远镜,洗发水瓶,箱子,鞋,鞋子,信封,烟灰缸,遥控器,钥匙,衣服,衣架,音响,饮料瓶,鱼缸,瑜伽球,雨伞,枕头,纸牌,纸箱,纸制品,桌子。'."\n"
+ ."\n"
+ .'- 干垃圾 (Dry waste):'."\n"
+ .'百洁布,笔,便利贴,彩票,餐盒,餐巾纸,苍蝇拍,草帽,茶壶碎片,唱片,车票,除湿袋,厨房抹布,厨房手套,串串竹签,创可贴,搓澡巾,打火机,起泡网,大龙虾头,电蚊香,电影票,防霉防蛀片,干燥剂,鸡毛掸,胶带,胶水包装,酒精棉,空调滤芯,口罩,毛巾,奶茶杯,破碎陶瓷,湿纸巾,塑料袋,图钉,涂改带,卫生纸,牙签,牙刷,烟蒂,眼镜,眼镜布,验孕棒,一次性杯子,一次性棉签,竹筷,U型回形针,陶瓷。'."\n"
+ ."\n"
+ .'- 有害垃圾 (Hazardous waste):'."\n"
+ .'灯,电池,电池板,胶水,纽扣电池,杀虫剂,温度计,蓄电池,血压计,药膏,药片,药品包装,药瓶,指甲油。'."\n"
+ ."\n"
+ .'## SDK reference'."\n"
+ .'For the waste classification and recognition feature under the Alibaba Cloud Vision AI image recognition category, we recommend using the SDK. Multiple programming languages are supported. When calling the operation, select the SDK package for the image recognition (imagerecog) AI category. The SDK supports both local files and arbitrary URLs as file parameters. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in common programming languages, see [ClassifyingRubbish sample code](~~601145~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of waste classification and recognition, see [Common error codes](~~145022~~).'."\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:34:17.000Z', 'description' => 'Error codes changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ClassifyingRubbish'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:ClassifyingRubbish',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"572974F0-1014-5C60-97EE-DBFFC0FF7616\\",\\n \\"Data\\": {\\n \\"Status\\": \\"PROCESS_SUCCESS\\",\\n \\"ErrorMessage\\": \\"paramsIllegal\\",\\n \\"Result\\": \\"{\\\\\\\\\\\\\\"tags\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\"confidence\\\\\\\\\\\\\\":-1,\\\\\\\\\\\\\\"value\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"tagInfo\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"humanInfo\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": [[{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"category\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"human-real-normal\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"score\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": 0.9690580798778683, \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"bbox\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": [77, 280, 431, 569], \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"cloth_category\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"modern\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"cloth_category_score\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": 0.7393399477005005}]], \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"sceneInfo\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": [[{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"category\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"gamescreen-gameeffect\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"score\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": 0.44200169294841274}]], \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"objectInfo\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": [null]}}\\\\\\\\\\\\\\"}]}\\",\\n \\"ErrorCode\\": \\"InvalidParameter\\",\\n \\"JobId\\": \\"72CFDC08-3FEF-56AA-91E5-B14DE31C09C2\\"\\n }\\n}","errorExample":""},{"type":"xml","example":"<GetAsyncJobResultResponse>\\n <RequestId>572974F0-1014-5C60-97EE-DBFFC0FF7616</RequestId>\\n <Data>\\n <Status>PROCESS_SUCCESS</Status>\\n <ErrorMessage>paramsIllegal</ErrorMessage>\\n <Result>{\\\\\\"tags\\\\\\":[{\\\\\\"confidence\\\\\\":-1,\\\\\\"value\\\\\\":\\\\\\"{\\\\\\\\\\\\\\"tagInfo\\\\\\\\\\\\\\": {\\\\\\\\\\\\\\"humanInfo\\\\\\\\\\\\\\": [[{\\\\\\\\\\\\\\"category\\\\\\\\\\\\\\": \\\\\\\\\\\\\\"human-real-normal\\\\\\\\\\\\\\", \\\\\\\\\\\\\\"score\\\\\\\\\\\\\\": 0.9690580798778683, \\\\\\\\\\\\\\"bbox\\\\\\\\\\\\\\": [77, 280, 431, 569], \\\\\\\\\\\\\\"cloth_category\\\\\\\\\\\\\\": \\\\\\\\\\\\\\"modern\\\\\\\\\\\\\\", \\\\\\\\\\\\\\"cloth_category_score\\\\\\\\\\\\\\": 0.7393399477005005}]], \\\\\\\\\\\\\\"sceneInfo\\\\\\\\\\\\\\": [[{\\\\\\\\\\\\\\"category\\\\\\\\\\\\\\": \\\\\\\\\\\\\\"gamescreen-gameeffect\\\\\\\\\\\\\\", \\\\\\\\\\\\\\"score\\\\\\\\\\\\\\": 0.44200169294841274}]], \\\\\\\\\\\\\\"objectInfo\\\\\\\\\\\\\\": [null]}}\\\\\\"}]}</Result>\\n <ErrorCode>InvalidParameter</ErrorCode>\\n <JobId>72CFDC08-3FEF-56AA-91E5-B14DE31C09C2</JobId>\\n </Data>\\n</GetAsyncJobResultResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'EvaluateCertificateQuality' => [
- 'methods' => [
- 'post',
- 'get',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'DetectImageElements' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'read',
+ 'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
- 'name' => 'ImageURL',
+ 'name' => 'Url',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'https://viapi-doc.oss-cn-shanghai.aliyuncs.com/imagerecog/xxxxx.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
- ],
- [
- 'name' => 'Type',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'BusinessLicense',
- 'required' => true,
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link 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/imagerecog/DetectImageElements/DetectImageElements5.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '656318DC-3856-43E3-9147-859532721AD6',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '7EE82437-AEC4-5AAF-819F-AB28C23EE0FC', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
'properties' => [
'Elements' => [
- 'description' => '',
+ 'description' => 'The element list.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
- 'Value' => [
- 'description' => '',
- 'example' => 'lackoffront',
- 'type' => 'string',
- ],
- 'Pass' => [
- 'description' => '',
- 'example' => 'false',
- 'type' => 'string',
- ],
- 'Score' => [
- 'description' => '',
- 'example' => '0.06514739990234375',
- 'type' => 'string',
- ],
+ 'Type' => ['description' => 'The element type. Valid values:'."\n"
+ .'UnType (undefined type), AllType (all types), RootType (root type), Synthesis (composite element), Embedded (all nested types), Format (element format), MajorObject (subject), Character (text), Identifier (identifier), Background (background), Decoration (decoration), MajorHuman (human model), MajorAuction (product), MajorThing (object), MajorOther (other subject), CharMain (main text), CharSub (secondary text), CharAction (call-to-action text), CharContent (content text), CharNumber (numeric text), CharOther (other text), IdentLogo (logo identifier), IdentLight (highlight identifier), IdentCode (code identifier), IdentOther (other identifier), BackBitmap (bitmap background), BackVector (vector background), BackOther (other background), DecoTile (tiled decoration), DecoRegion (regional decoration), DecoPieces (fragment decoration), DecoEdge (edge decoration), DecoLine (linear decoration), DecoBox (box decoration), DecoChar (call-to-action text decoration), DecoOther (other decoration), SynthMajor (subject group), SynthChar (text group), SynthIdent (identifier group), SynthBack (background group), SynthDeco (decoration group), SynthOther (other group), EmbedSvg (SVG nested format), EmbedJson (JSON nested format), EmbedHtml (HTML nested format).', 'type' => 'string', 'example' => 'majorhuman', 'title' => ''],
+ 'Width' => ['description' => 'The width of the element.', 'type' => 'integer', 'format' => 'int32', 'example' => '285', 'title' => ''],
+ 'Height' => ['description' => 'The height of the element.', 'type' => 'integer', 'format' => 'int32', 'example' => '354', 'title' => ''],
+ 'Y' => ['description' => 'The Y-coordinate of the upper-left corner of the element.', 'type' => 'integer', 'format' => 'int32', 'example' => '78', 'title' => ''],
+ 'Score' => ['description' => 'The confidence score. A higher confidence score indicates a higher probability that the element type is correctly identified. Value range: [0.0, 1.0].', 'type' => 'number', 'format' => 'float', 'example' => '0.997097373008728', 'title' => ''],
+ 'X' => ['description' => 'The X-coordinate of the upper-left corner of the element.', 'type' => 'integer', 'format' => 'int32', 'example' => '287', '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\\": \\"7EE82437-AEC4-5AAF-819F-AB28C23EE0FC\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Type\\": \\"majorhuman\\",\\n \\"Width\\": 285,\\n \\"Height\\": 354,\\n \\"Y\\": 78,\\n \\"Score\\": 0.997097373008728,\\n \\"X\\": 287\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Element recognition',
+ 'summary' => 'This topic describes the syntax and examples of the DetectImageElements operation for element recognition.',
+ 'description' => '## Feature description'."\n"
+ .'The element recognition feature identifies the elements contained in an input image, annotates their positions with bounding boxes, and classifies them into primitive data types (person, decoration, and text).'."\n"
+ ."\n"
+ .'- Input image:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/imxc/DetectImageElements.jpg" width="500)'."\n"
+ .'- Output image:'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/ospt/DetectImageElementsshuchu.png" width="500)'."\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=imagerecog&children=DetectImageElements) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration or usage of Alibaba Cloud Vision 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 recognition service](https://vision.aliyun.com/imagerecog). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imagerecog_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/imagerecog/2019-09-30/DetectImageElements?lang=JAVA&sdkStyle=dara&params=%7B%22Url%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimagerecog%2FDetectImageElements%2FDetectImageElements1.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 recognition (imagerecog) 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 commonly used languages, see [Element recognition sample code](~~601121~~).'."\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: up to 3 MB.'."\n"
+ .'- Image resolution: up to 1280 × 1280 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For the billable methods and pricing of element recognition, see [Billing overview](~~202481~~).'."\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=imagerecog&children=DetectImageElements).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use an SDK to call the element recognition feature under the Alibaba Cloud Vision AI image recognition category. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the image recognition (imagerecog) AI 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 [Element recognition sample code](~~601121~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of element recognition, see [Common error codes](~~145022~~).'."\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:34:17.000Z', 'description' => 'Error codes changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DetectImageElements'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:DetectImageElements',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"656318DC-3856-43E3-9147-859532721AD6\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Value\\": \\"lackoffront\\",\\n \\"Pass\\": \\"false\\",\\n \\"Score\\": \\"0.06514739990234375\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RequestId>656318DC-3856-43E3-9147-859532721AD6</RequestId>\\n<Data>\\n <Elements>\\n <Value>lackoffront</Value>\\n <Score>0.06514739990234375</Score>\\n <Pass>false</Pass>\\n </Elements>\\n</Data>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'TaggingImage' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'EvaluateCertificateQuality' => [
+ 'methods' => ['post', 'get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -287,95 +354,167 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imagerecog/TaggingImage/TaggingImage1.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 the OSS URL is not in the Shanghai region, see [File URL processing](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-doc.oss-cn-shanghai.aliyuncs.com/imagerecog/xxxxx.jpg', 'title' => ''],
+ ],
+ [
+ 'name' => 'Type',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The document type. Valid values:'."\n"
+ ."\n"
+ .'- IDCard: identity card.'."\n"
+ .'- BusinessLicense: electronic business license.', 'type' => 'string', 'required' => true, 'example' => 'BusinessLicense', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '70ED13B0-BC22-576D-9CCF-1CC12FEAC477',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '656318DC-3856-43E3-9147-859532721AD6', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
'properties' => [
- 'Tags' => [
- 'description' => '',
+ 'Elements' => [
+ 'description' => 'The list of identified quality issues.',
+ 'type' => 'array',
'items' => [
- 'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'Value' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Confidence' => [
- 'description' => '',
- 'example' => '65',
- 'format' => 'float',
- 'type' => 'number',
- ],
+ 'Value' => ['description' => 'The issue type. Valid values:'."\n"
+ ."\n"
+ .'- lackoffront: front-facing photo is missing.'."\n"
+ .'- copy: the photo is a photocopy.'."\n"
+ .'- imageincomplete: the document image is incomplete.'."\n"
+ .'- nationalemblemincomplete: the national emblem on the business license is incomplete.'."\n"
+ .'- lackofseal: a seal is missing.'."\n"
+ .'- electronic: the photo is from an electronic file.'."\n"
+ .'- reflection: glare is detected.'."\n"
+ ."\n"
+ .'> - If the request parameter **Type** is set to IDCard, the lackofseal value is not applicable.'."\n"
+ .'- If the request parameter **Type** is set to BusinessLicense, the lackoffront value is not applicable.', 'type' => 'string', 'example' => 'lackoffront', 'title' => ''],
+ 'Pass' => ['description' => 'Indicates whether the check is passed. Valid values:'."\n"
+ ."\n"
+ .'- true: The check is passed.'."\n"
+ .'- false: The check is not passed.'."\n"
+ .'- verify: The document quality cannot be verified. Confirm manually.'."\n"
+ .'- ERROR: The algorithm inference for this module failed.', 'type' => 'string', 'example' => 'false', 'title' => ''],
+ 'Score' => ['description' => 'The quality issue score. A higher score indicates a more severe issue. The value is an integer from 0 to 100.'."\n"
+ ."\n"
+ .'- If the system cannot provide a score, the output is `score`.'."\n"
+ .'- If the **Pass** field is `ERROR`, the output is `null`.', 'type' => 'string', 'example' => '0.06514739990234375', '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\\": \\"656318DC-3856-43E3-9147-859532721AD6\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Value\\": \\"lackoffront\\",\\n \\"Pass\\": \\"false\\",\\n \\"Score\\": \\"0.06514739990234375\\"\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'ID photo quality review',
+ 'summary' => 'This topic describes the syntax and provides examples of the EvaluateCertificateQuality operation for ID photo quality review.',
+ 'description' => '## Feature description'."\n"
+ .'The ID photo quality review feature identifies whether a captured ID photo has quality issues and specifies the types of quality issues detected.'."\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"
+ .'- Online verification: During online verification, you need to submit photos of identity cards, business licenses, passports, checks, and other documents. The quality of captured photos varies, and some photos may not meet the clarity requirements for verification due to shooting conditions or watermarks. The ID photo quality review feature can automatically identify quality issues in document images, reducing the need for manual review.'."\n"
+ .'- Registration: During offline registration, you need to capture electronic copies of documents. However, shooting conditions vary, and some photos may have quality issues. The ID photo quality review feature can filter out photos with quality issues to prevent operation failures and errors during subsequent use and recognition.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ ."\n"
+ .'- Comprehensive inspection: Performs a comprehensive inspection of photo quality factors that affect verification. The inspection items include: whether the photo is of the target document type, whether a front-facing photo is missing, whether the photo is a photocopy, whether the document image is complete, whether a seal is missing, whether the photo is from an electronic file, whether there is glare, whether there is watermark coverage, and text clarity. These aspects are evaluated to determine whether the photo affects verification validity.'."\n"
+ .'- Real-world business experience: This algorithm is refined through real-world business practices at Alibaba and summarizes various quality issues that affect registration review, helping to automate business processes.'."\n"
+ ."\n"
+ .'## Integration guide'."\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 create an account.'."\n"
+ .'2. Activate the feature: Make sure that you have activated the [image recognition service](https://vision.aliyun.com/imagerecog). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imagerecog_public_cn#/open).'."\n"
+ .'3. Create an AccessKey pair: Make sure that 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/imagerecog/2019-09-30/EvaluateCertificateQuality?lang=JAVA) 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 that you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the image recognition (imagerecog) 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 commonly used programming languages, see [EvaluateCertificateQuality sample code](~~601120~~).'."\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 a mini program](~~467780~~)'."\n"
+ .'- [Direct call from Android](~~467781~~)'."\n"
+ .'- [Direct call from iOS](~~467782~~).'."\n"
+ ."\n"
+ .'## Input limits'."\n"
+ .'- Image type: JPEG, JPG, BMP, or PNG.'."\n"
+ .'- Image size: less than 10 MB.'."\n"
+ .'- Image resolution: greater than 100 × 100 pixels and less than 5000 × 5000 pixels.'."\n"
+ .'- The URL cannot contain Chinese characters.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the ID photo quality review feature under the Alibaba Cloud Vision AI image recognition 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 recognition (imagerecog) 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 commonly used programming languages, see [EvaluateCertificateQuality sample code](~~601120~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the ID photo quality review feature, see [Common error codes](~~145022~~).'."\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' => '2022-03-30T03:34:17.000Z', 'description' => 'Error codes changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'EvaluateCertificateQuality'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:EvaluateCertificateQuality',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"70ED13B0-BC22-576D-9CCF-1CC12FEAC477\\",\\n \\"Data\\": {\\n \\"Tags\\": [\\n {\\n \\"Value\\": \\"沙发\\",\\n \\"Confidence\\": 65\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<TaggingImageResponse>\\n <RequestId>70ED13B0-BC22-576D-9CCF-1CC12FEAC477</RequestId>\\n <Data>\\n <Tags>\\n <Confidence>65</Confidence>\\n <Value>沙发</Value>\\n </Tags>\\n <Tags>\\n <Confidence>41</Confidence>\\n <Value>床</Value>\\n </Tags>\\n <Tags>\\n <Confidence>24</Confidence>\\n <Value>家具</Value>\\n </Tags>\\n <Tags>\\n <Confidence>13</Confidence>\\n <Value>长沙发</Value>\\n </Tags>\\n <Tags>\\n <Confidence>11</Confidence>\\n <Value>卧室</Value>\\n </Tags>\\n </Data>\\n</TaggingImageResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
- 'ClassifyingRubbish' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'GetAsyncJobResult' => [
+ 'methods' => ['get'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -383,113 +522,108 @@
],
'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => ['operationType' => 'get'],
'parameters' => [
[
- 'name' => 'ImageURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imagerecog/ClassifyingRubbish/ClassifyingRubbish6.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
+ 'name' => 'JobId',
+ 'in' => 'query',
+ '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' => '72CFDC08-3FEF-56AA-91E5-B14DE31C09C2', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '1619647E-92ED-5641-A1D9-F05C33FD294A',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '572974F0-1014-5C60-97EE-DBFFC0FF7616', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
'properties' => [
- 'Sensitive' => [
- 'description' => '',
- 'example' => 'false',
- 'type' => 'boolean',
- ],
- 'Elements' => [
- 'description' => '',
- 'items' => [
- 'properties' => [
- 'CategoryScore' => [
- 'description' => '',
- 'example' => '0.9406',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'Rubbish' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'RubbishScore' => [
- 'description' => '',
- 'example' => '0.9406',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'Category' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- ],
- 'type' => 'object',
- ],
- 'type' => 'array',
- ],
+ '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 is 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 is 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' => '{\\"tags\\":[{\\"confidence\\":-1,\\"value\\":\\"{\\\\\\"tagInfo\\\\\\": {\\\\\\"humanInfo\\\\\\": [[{\\\\\\"category\\\\\\": \\\\\\"human-real-normal\\\\\\", \\\\\\"score\\\\\\": 0.9690580798778683, \\\\\\"bbox\\\\\\": [77, 280, 431, 569], \\\\\\"cloth_category\\\\\\": \\\\\\"modern\\\\\\", \\\\\\"cloth_category_score\\\\\\": 0.7393399477005005}]], \\\\\\"sceneInfo\\\\\\": [[{\\\\\\"category\\\\\\": \\\\\\"gamescreen-gameeffect\\\\\\", \\\\\\"score\\\\\\": 0.44200169294841274}]], \\\\\\"objectInfo\\\\\\": [null]}}\\"}]}', 'title' => ''],
+ 'ErrorCode' => ['description' => 'The error code of the asynchronous task.', 'type' => 'string', 'example' => 'InvalidParameter', 'title' => ''],
+ 'JobId' => ['description' => 'The asynchronous task ID.', 'type' => 'string', 'example' => '72CFDC08-3FEF-56AA-91E5-B14DE31C09C2', '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\\": \\"572974F0-1014-5C60-97EE-DBFFC0FF7616\\",\\n \\"Data\\": {\\n \\"Status\\": \\"PROCESS_SUCCESS\\",\\n \\"ErrorMessage\\": \\"paramsIllegal\\",\\n \\"Result\\": \\"{\\\\\\\\\\\\\\"tags\\\\\\\\\\\\\\":[{\\\\\\\\\\\\\\"confidence\\\\\\\\\\\\\\":-1,\\\\\\\\\\\\\\"value\\\\\\\\\\\\\\":\\\\\\\\\\\\\\"{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"tagInfo\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": {\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"humanInfo\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": [[{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"category\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"human-real-normal\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"score\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": 0.9690580798778683, \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"bbox\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": [77, 280, 431, 569], \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"cloth_category\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"modern\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"cloth_category_score\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": 0.7393399477005005}]], \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"sceneInfo\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": [[{\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"category\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"gamescreen-gameeffect\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\", \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"score\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": 0.44200169294841274}]], \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"objectInfo\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\": [null]}}\\\\\\\\\\\\\\"}]}\\",\\n \\"ErrorCode\\": \\"InvalidParameter\\",\\n \\"JobId\\": \\"72CFDC08-3FEF-56AA-91E5-B14DE31C09C2\\"\\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 is not 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"
+ .'In the image recognition category, the TaggingAdImage operation for ad creative analysis is an asynchronous operation. You must invoke GetAsyncJobResult to obtain the actual result.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'We recommend that you use the Alibaba Cloud Vision AI SDK, which supports multiple programming languages. You can use the SDK to call operations with local files or URLs as file parameters. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the asynchronous task result query operation, see [Common error codes](~~145022~~).'."\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 console are valid for 1 hour and are automatically deleted by the system after 24 hours.',
+ 'changeSet' => [],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:GetAsyncJobResult',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"1619647E-92ED-5641-A1D9-F05C33FD294A\\",\\n \\"Data\\": {\\n \\"Sensitive\\": false,\\n \\"Elements\\": [\\n {\\n \\"CategoryScore\\": 0.9406,\\n \\"Rubbish\\": \\"纸板箱\\",\\n \\"RubbishScore\\": 0.9406,\\n \\"Category\\": \\"可回收垃圾\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<ClassifyingRubbishResponse>\\n <RequestId>1619647E-92ED-5641-A1D9-F05C33FD294A</RequestId>\\n <Data>\\n <Sensitive>false</Sensitive>\\n <Elements>\\n <Rubbish>纸板箱</Rubbish>\\n <Category>可回收垃圾</Category>\\n <CategoryScore>0.9406</CategoryScore>\\n <RubbishScore>0.9406</RubbishScore>\\n </Elements>\\n </Data>\\n</ClassifyingRubbishResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
],
- 'DetectImageElements' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'RecognizeImageColor' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -502,430 +636,575 @@
[
'name' => 'Url',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imagerecog/DetectImageElements/DetectImageElements5.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~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imagerecog/RecognizeImageColor/RecognizeImageColor1.jpg', 'title' => ''],
+ ],
+ [
+ 'name' => 'ColorCount',
+ 'in' => 'formData',
+ 'schema' => ['description' => 'The expected number of colors in the output palette. Valid values: 1 to 10. Default value: 3.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '16', 'minimum' => '1', 'pattern' => '^\\d+$', 'default' => '3', 'example' => '5', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '7EE82437-AEC4-5AAF-819F-AB28C23EE0FC',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'CCC7C1D9-8C0F-58AD-ADE3-C331B83BD6F2', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned data.',
+ 'type' => 'object',
'properties' => [
- 'Elements' => [
- 'description' => '',
+ 'ColorTemplateList' => [
+ 'description' => 'The color palette list.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
- 'Type' => [
- 'description' => '',
- 'example' => 'majorhuman',
- 'type' => 'string',
- ],
- 'Width' => [
- 'description' => '',
- 'example' => '285',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Height' => [
- 'description' => '',
- 'example' => '354',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Y' => [
- 'description' => '',
- 'example' => '78',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
- 'Score' => [
- 'description' => '',
- 'example' => '0.997097373008728',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'X' => [
- 'description' => '',
- 'example' => '287',
- 'format' => 'int32',
- 'type' => 'integer',
- ],
+ 'Color' => ['description' => 'The RGB color value in hexadecimal format, such as 291A18.', 'type' => 'string', 'example' => '270315', 'title' => ''],
+ 'Percentage' => ['description' => 'The proportion of the current color label. Value range: `[0.0, 1.0]`.', 'type' => 'number', 'format' => 'float', 'example' => '0.459527', 'title' => ''],
+ 'Label' => ['description' => 'The color label. A total of 11 labels are supported: black, white, gray, red, orange, yellow, green, cyan, blue, purple, and magenta.', 'type' => 'string', 'example' => 'red', '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\\": \\"CCC7C1D9-8C0F-58AD-ADE3-C331B83BD6F2\\",\\n \\"Data\\": {\\n \\"ColorTemplateList\\": [\\n {\\n \\"Color\\": \\"270315\\",\\n \\"Percentage\\": 0.459527,\\n \\"Label\\": \\"red\\"\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Color recognition',
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeImageColor operation.',
+ 'description' => '## Feature description'."\n"
+ .'The color recognition feature analyzes the color information of an input image and outputs color values (in RGB and HEX formats) along with their corresponding proportions.'."\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=imagerecog&children=RecognizeImageColor) to experience this feature or purchase it online.'."\n"
+ .'- For questions about API integration or usage of visual AI features on the Alibaba Cloud Vision 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 feature: Make sure you have activated the [image recognition service](https://vision.aliyun.com/imagerecog). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imagerecog_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/imagerecog/2019-09-30/RecognizeImageColor?lang=JAVA&sdkStyle=dara&params={%22Url%22:%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimagerecog%2FRecognizeImageColor%2FRecognizeImageColor1.jpg%22,%22ColorCount%22:3}&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 image recognition (imagerecog) 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 commonly used languages, see [Color recognition sample code](~~478784~~).'."\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: PNG, JPG, JPEG, or BMP.'."\n"
+ .'- Image size: up to 9.5 MB.'."\n"
+ .'- Image resolution: less than 2500 × 2500 pixels.'."\n"
+ .'- Images must be in RGB 3-channel format.'."\n"
+ ."\n"
+ .'- The URL cannot contain Chinese characters.'."\n"
+ ."\n"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of color recognition, see [Billing overview](~~202481~~).'."\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=imagerecog&children=RecognizeImageColor).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the color recognition feature under the Alibaba Cloud Vision AI image recognition 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 recognition (imagerecog) 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 [Color recognition sample code](~~478784~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of color recognition, see [Common error codes](~~145022~~).'."\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:34:17.000Z', 'description' => 'Error codes changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeImageColor'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:RecognizeImageColor',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"7EE82437-AEC4-5AAF-819F-AB28C23EE0FC\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Type\\": \\"majorhuman\\",\\n \\"Width\\": 285,\\n \\"Height\\": 354,\\n \\"Y\\": 78,\\n \\"Score\\": 0.997097373008728,\\n \\"X\\": 287\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<DetectImageElementsResponse>\\n <RequestId>7EE82437-AEC4-5AAF-819F-AB28C23EE0FC</RequestId>\\n <Data>\\n <Elements>\\n <Type>character</Type>\\n <Score>0.999164342880249</Score>\\n <X>490</X>\\n <Y>215</Y>\\n <Height>66</Height>\\n <Width>380</Width>\\n </Elements>\\n <Elements>\\n <Type>character</Type>\\n <Score>0.998594701290131</Score>\\n <X>531</X>\\n <Y>302</Y>\\n <Height>38</Height>\\n <Width>308</Width>\\n </Elements>\\n <Elements>\\n <Type>majorauction</Type>\\n <Score>0.983854711055756</Score>\\n <X>51</X>\\n <Y>80</Y>\\n <Height>392</Height>\\n <Width>464</Width>\\n </Elements>\\n <Elements>\\n <Type>decoration</Type>\\n <Score>0.915460407733917</Score>\\n <X>596</X>\\n <Y>148</Y>\\n <Height>50</Height>\\n <Width>170</Width>\\n </Elements>\\n <Elements>\\n <Type>decoration</Type>\\n <Score>0.777607440948486</Score>\\n <X>649</X>\\n <Y>149</Y>\\n <Height>45</Height>\\n <Width>63</Width>\\n </Elements>\\n <Elements>\\n <Type>character</Type>\\n <Score>0.712217330932617</Score>\\n <X>533</X>\\n <Y>349</Y>\\n <Height>20</Height>\\n <Width>297</Width>\\n </Elements>\\n <Elements>\\n <Type>character</Type>\\n <Score>0.701746642589569</Score>\\n <X>239</X>\\n <Y>129</Y>\\n <Height>36</Height>\\n <Width>72</Width>\\n </Elements>\\n <Elements>\\n <Type>decoration</Type>\\n <Score>0.598963797092438</Score>\\n <X>594</X>\\n <Y>166</Y>\\n <Height>30</Height>\\n <Width>67</Width>\\n </Elements>\\n <Elements>\\n <Type>decoration</Type>\\n <Score>0.502112746238708</Score>\\n <X>703</X>\\n <Y>167</Y>\\n <Height>29</Height>\\n <Width>67</Width>\\n </Elements>\\n </Data>\\n</DetectImageElementsResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
- 'RecognizeFood' => [
- 'summary' => '菜品识别',
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'RecognizeImageStyle' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
+ 'operationType' => 'readAndWrite',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
- 'name' => 'ImageURL',
+ 'name' => 'Url',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imagerecog/RecognizeFood/RecognizeFood5.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'title' => 'A short description of struct',
- 'type' => 'string',
- ],
+ 'schema' => ['description' => 'The URL of the image. We recommend that you use an Object Storage Service (OSS) link 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/imagerecog/RecognizeImageStyle/RecognizeImageStyle1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
- 'description' => 'Schema of Response',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '4C2369C5-54E0-4B9F-8ACB-80C4F50AD2DB',
- 'title' => 'Id of the request',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '66FC3009-9A7A-4D29-8B70-D6EB256EF590', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
'properties' => [
- 'TopFives' => [
- 'description' => '',
- 'items' => [
- 'description' => '1',
- 'properties' => [
- 'Category' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Score' => [
- 'description' => '',
- 'example' => '0.2083740234375',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'Calorie' => [
- 'description' => '',
- 'example' => '208',
- 'type' => 'string',
- ],
- ],
- 'type' => 'object',
- ],
+ 'Styles' => [
'type' => 'array',
+ 'items' => ['description' => 'The list of recognized styles. Styles include: chinese, watercolor, cartoon, real, standard, simple, lively, colourful, luxury, technology, morbidezza, strong, simpleelegant, coolcold, promotion, and protrude.', 'type' => 'string', 'example' => 'technology', 'title' => ''],
+ 'description' => '',
+ 'title' => '',
+ 'example' => '',
],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
],
- 'title' => 'Schema of Response',
- '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\\": \\"66FC3009-9A7A-4D29-8B70-D6EB256EF590\\",\\n \\"Data\\": {\\n \\"Styles\\": [\\n \\"technology\\"\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Recognize image style',
+ 'summary' => 'This topic describes the syntax and examples of the RecognizeImageStyle operation.',
+ 'description' => '## Feature description'."\n"
+ .'The image style recognition feature analyzes the style type of an input image and identifies possible style and semantic labels. Recognizable styles include: chinese, watercolor, cartoon, real, standard, simple, lively, colourful, luxury, technology, morbidezza, strong, simpleelegant, coolcold, promotion, and protrude.'."\n"
+ .'The following figure shows an example of this operation: '."\n"
+ .'The visual style is Chinese, and the semantic style is promotion.'."\n"
+ .'![](https://static-aliyun-doc.oss-cn-hangzhou.aliyuncs.com/file-manage-files/zh-CN/20221108/sqbq/RecognizeImageStyle.jpg" width="500)'."\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 Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imagerecog&children=RecognizeImageStyle) to experience this feature or purchase it online.'."\n"
+ .'- To connect to the Alibaba Cloud Vision Intelligence Open Platform, use the visual AI APIs, or consult about 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 **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 recognition service](https://vision.aliyun.com/imagerecog). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imagerecog_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/imagerecog/2019-09-30/RecognizeImageStyle?lang=JAVA&sdkStyle=dara&params=%7B%22Url%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimagerecog%2FRecognizeImageStyle%2FRecognizeImageStyle1.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 the [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the image recognition (imagerecog) 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. 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: PNG, JPG, JPEG, BMP, or WEBP.'."\n"
+ .'- Image size: up to 9.5 MB.'."\n"
+ .'- Image resolution: less than 3000 × 3000 pixels.'."\n"
+ .'- Images must be in RGB 3-channel format.'."\n"
+ .'- The URL cannot contain Chinese characters.',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the image style recognition feature under the Alibaba Cloud Vision AI image recognition category, we recommend using the SDK. The SDK supports multiple programming languages. When calling the operation, select the SDK package for the image recognition (imagerecog) AI category. File parameters passed through the SDK support both local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of the image style recognition operation, see [Common error codes](~~145022~~).'."\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-11-07T01:44:30.000Z', 'description' => 'Error codes changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeImageStyle'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:RecognizeImageStyle',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"4C2369C5-54E0-4B9F-8ACB-80C4F50AD2DB\\",\\n \\"Data\\": {\\n \\"TopFives\\": [\\n {\\n \\"Category\\": \\"清蒸鲈鱼\\",\\n \\"Score\\": 0.2083740234375,\\n \\"Calorie\\": \\"208\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeFoodResponse>\\n <RequestId>B6F48953-92F4-5388-A000-0057D46B1658</RequestId>\\n <Data>\\n <TopFives>\\n <Calorie>105</Calorie>\\n <Score>0.56878662109375</Score>\\n <Category>清蒸鲈鱼</Category>\\n </TopFives>\\n <TopFives>\\n <Calorie>117</Calorie>\\n <Score>0.0455322265625</Score>\\n <Category>鳜鱼</Category>\\n </TopFives>\\n <TopFives>\\n <Calorie>112</Calorie>\\n <Score>0.039886474609375</Score>\\n <Category>清蒸桂花鱼</Category>\\n </TopFives>\\n <TopFives>\\n <Calorie>118</Calorie>\\n <Score>0.0296173095703125</Score>\\n <Category>沸腾鱼</Category>\\n </TopFives>\\n <TopFives>\\n <Calorie>UNKNOWN</Calorie>\\n <Score>0.0205230712890625</Score>\\n <Category>其他类</Category>\\n </TopFives>\\n </Data>\\n</RecognizeFoodResponse>","errorExample":""}]',
],
- 'RecognizeImageColor' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'RecognizeScene' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'readAndWrite',
+ 'operationType' => 'read',
'deprecated' => false,
'systemTags' => [],
'parameters' => [
[
- 'name' => 'Url',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imagerecog/RecognizeImageColor/RecognizeImageColor1.jpg',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
- ],
- ],
- [
- 'name' => 'ColorCount',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => '5',
- 'format' => 'int32',
- 'maximum' => '16',
- 'minimum' => '1',
- 'pattern' => '^\\d+$',
- 'required' => false,
- 'type' => 'integer',
- 'default' => '3',
- ],
+ '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~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imagerecog/RecognizeScene/RecognizeScene1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'CCC7C1D9-8C0F-58AD-ADE3-C331B83BD6F2',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => 'AC79F887-5CCB-42BE-8AC3-4D455EFEDB94', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
'properties' => [
- 'ColorTemplateList' => [
- 'description' => '',
+ 'Tags' => [
+ 'description' => 'The tag names. A maximum of five tag names are returned. If a category tag is not returned, the corresponding `confidence` is zero.',
+ 'type' => 'array',
'items' => [
+ 'type' => 'object',
'properties' => [
- 'Color' => [
- 'description' => '',
- 'example' => '270315',
- 'type' => 'string',
- ],
- 'Percentage' => [
- 'description' => '',
- 'example' => '0.459527',
- 'format' => 'float',
- 'type' => 'number',
- ],
- 'Label' => [
- 'description' => '',
- 'example' => 'red',
- 'type' => 'string',
- ],
+ 'Value' => ['description' => 'The tag name.', 'type' => 'string', 'example' => '船', 'title' => ''],
+ 'Confidence' => ['description' => 'The confidence score of the tag name. Valid values: 0 to 100.', 'type' => 'number', 'format' => 'float', 'example' => '79', '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\\": \\"AC79F887-5CCB-42BE-8AC3-4D455EFEDB94\\",\\n \\"Data\\": {\\n \\"Tags\\": [\\n {\\n \\"Value\\": \\"船\\",\\n \\"Confidence\\": 79\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'Scene recognition',
+ 'summary' => 'This topic describes the syntax and examples of the scene recognition feature (RecognizeScene).',
+ 'description' => '## Feature description'."\n"
+ .'The scene recognition feature identifies the scene environment in images. It supports dozens of common scenes, including:'."\n"
+ .'- People, animals, dogs, cats, fish, birds, flowers, lawns, vegetables, plants, fruits, restaurants, food, banquets, barbecues'."\n"
+ .'- Objects, mobile phones, monitors'."\n"
+ .'- Outdoors, squares, buildings, amusement parks, outdoor areas, highways, streams, mountain peaks, night scenes, skies, travel, sunrises, sunsets, forests, beaches, deserts, seasides, lakes, camping, street views, streets, sports, stadiums, weddings, performances'."\n"
+ .'- Subways, cars, trains, bicycles, boats, airplanes'."\n"
+ .'- Others'."\n"
+ ."\n"
+ .'> - You can visit [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 Vision Intelligence Open Platform. Click [Try Now](https://vision.aliyun.com/experience/detail?&tagName=imagerecog&children=RecognizeScene) to try this feature or purchase it online.'."\n"
+ .'- For questions about API integration or usage of Alibaba Cloud Vision 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 feature: Make sure you have activated the [image recognition service](https://vision.aliyun.com/imagerecog). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imagerecog_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/imagerecog/2019-09-30/RecognizeScene?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimagerecog%2FRecognizeScene%2FRecognizeScene1.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:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the image recognition (imagerecog) 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 programming languages, see [Scene recognition sample code](~~601110~~).'."\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, 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 scene recognition, see [Billing overview](~~202481~~).'."\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=imagerecog&children=RecognizeScene).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'To use the scene recognition feature under the Alibaba Cloud Vision AI image recognition (imagerecog) category, use the SDK. Multiple programming languages are supported. Select the SDK package for the image recognition (imagerecog) AI category. File parameters passed through the SDK support local files and arbitrary URLs. For more information, see [SDK overview](~~145033~~).'."\n"
+ ."\n"
+ .'## Sample code'."\n"
+ .'For sample code in common programming languages, see [Scene recognition sample code](~~601110~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of scene recognition, see [Common error codes](~~145022~~).'."\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' => 'RecognizeScene'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:RecognizeScene',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"CCC7C1D9-8C0F-58AD-ADE3-C331B83BD6F2\\",\\n \\"Data\\": {\\n \\"ColorTemplateList\\": [\\n {\\n \\"Color\\": \\"270315\\",\\n \\"Percentage\\": 0.459527,\\n \\"Label\\": \\"red\\"\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeImageColorResponse>\\n <RequestId>CCC7C1D9-8C0F-58AD-ADE3-C331B83BD6F2</RequestId>\\n <Data>\\n <ColorTemplateList>\\n <Percentage>0.459527</Percentage>\\n <Color>270315</Color>\\n <Label>red</Label>\\n </ColorTemplateList>\\n <ColorTemplateList>\\n <Percentage>0.177192</Percentage>\\n <Color>5A0014</Color>\\n <Label>red</Label>\\n </ColorTemplateList>\\n <ColorTemplateList>\\n <Percentage>0.169271</Percentage>\\n <Color>F139CC</Color>\\n <Label>magenta</Label>\\n </ColorTemplateList>\\n <ColorTemplateList>\\n <Percentage>0.107205</Percentage>\\n <Color>610492</Color>\\n <Label>purple</Label>\\n </ColorTemplateList>\\n <ColorTemplateList>\\n <Percentage>0.086806</Percentage>\\n <Color>EC4886</Color>\\n <Label>red</Label>\\n </ColorTemplateList>\\n </Data>\\n</RecognizeImageColorResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
- 'RecognizeImageStyle' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'TaggingAdImage' => [
+ 'summary' => 'This topic describes the syntax and provides examples of TaggingAdImage.',
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
- 'operationType' => 'readAndWrite',
+ 'operationType' => 'read',
'deprecated' => false,
- 'systemTags' => [],
+ 'systemTags' => ['operationType' => 'none', 'riskType' => 'none', 'chargeType' => 'paid', 'tenantRelevance' => 'publicInformation'],
'parameters' => [
[
- 'name' => 'Url',
+ 'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imagerecog/RecognizeImageStyle/RecognizeImageStyle1.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](~~155645~~).', 'type' => 'string', 'required' => true, 'isFileTransferUrl' => true, 'example' => 'https://viapi-demo.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/DetectImageElements/xxxx.png', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'title' => '',
+ 'description' => 'Schema of Response',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '66FC3009-9A7A-4D29-8B70-D6EB256EF590',
- 'type' => 'string',
- ],
+ 'RequestId' => ['title' => '', 'description' => 'The request ID.', 'type' => 'string', 'example' => '572974F0-1014-5C60-97EE-DBFFC0FF7616'],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data. After the asynchronous task executes successfully, call the [GetAsyncJobResult](~~607824~~) operation and perform JSON deserialization on the Result field to obtain this data.',
+ 'type' => 'object',
'properties' => [
- 'Styles' => [
- 'items' => [
- 'description' => '',
- 'example' => 'technology',
- 'type' => 'string',
- ],
- 'type' => 'array',
- ],
+ 'TagInfo' => ['description' => 'The labels. Currently, only scene and human are returned. For specific values, see the "TagInfo field parameter description" table below.', 'type' => 'object', 'title' => '', 'example' => ''],
],
- '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' => ''],
+ ],
+ ],
+ 'responseDemo' => '[{"errorExample":"","example":"{\\n \\"RequestId\\": \\"572974F0-1014-5C60-97EE-DBFFC0FF7616\\",\\n \\"Data\\": {\\n \\"TagInfo\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","type":"json"}]',
+ 'title' => 'Ad image analysis',
+ 'description' => '## Feature description'."\n"
+ .'The ad image analysis feature tags elements in ad images, including people (celebrities, non-celebrities, and CG characters) and scenes. It supports thousands of content tags with broad coverage.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for online assistance.'."\n"
+ .'- To inquire about API integration, usage, or other issues related to the Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Common scenarios'."\n"
+ ."\n"
+ .'- Ad analysis: Analyzes Internet ad content and delivery performance data to provide insights for ad placement and analysis.'."\n"
+ .'- Precision targeting: Uses image tags and customer portraits to enable precise ad delivery.'."\n"
+ .'- Image retrieval: Quickly retrieves and locates images of a specified type.'."\n"
+ ."\n"
+ .'## Advantages'."\n"
+ ."\n"
+ .'- Strong analysis capability: Accurately tags complex scenes that contain celebrities, non-celebrities, and CG characters.'."\n"
+ .'- Precise tagging: Returns object and person tags simultaneously and precisely marks tag positions.'."\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 registration.'."\n"
+ .'2. Activate the service: Make sure you have activated the [image recognition service](https://vision.aliyun.com/imagerecog). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imagerecog_public_cn#/open).'."\n"
+ ."\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/imagerecog/2019-09-30/TaggingAdImage?lang=JAVA) 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 recognition (imagerecog) AI category in the corresponding SDK documentation.'."\n"
+ .'- Modify the sample code provided in the references as needed and call the operation.'."\n"
+ ."\n"
+ .'6. Sample code: For sample code in common languages for this feature, see [Ad image analysis sample code](~~601117~~). For sample code to query asynchronous task results in common languages, see [Query asynchronous task result sample code](~~607974~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client invocation 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"
+ .'## Billing description'."\n"
+ .'For information about the billable methods and pricing of ad image analysis, see [Billing overview](~~202481~~).'."\n"
+ ."\n"
+ .'> The debugging API below is a paid API.'."\n"
+ ."\n"
+ .'## Call procedure'."\n"
+ .'This feature is asynchronous and requires two steps to call.'."\n"
+ .'Step 1: Call the TaggingAdImage 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 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.',
+ 'responseParamsDescription' => '## TagInfo field parameter description'."\n"
+ ."\n"
+ .'| Field | Type | Required | Example value | Description |'."\n"
+ .'| -------------------- | ------ | -------- | --------------------------- | ------------------------------------------------------------ |'."\n"
+ .'| Cloth_category | string | Yes | modern | If this is a HumanInfo field, the clothing label of the identified person. For specific categories, see the "Category label values" figure below. If this is not a HumanInfo field, ignore this field. |'."\n"
+ .'| Cloth_category_score | float | Yes | 0.8 | If this is a HumanInfo field, the confidence score of the clothing label. Value range: [0, 1.0]. If this is not a HumanInfo field, ignore this field. |'."\n"
+ .'| Bbox | list | Yes | [77,280,431,569] | The relative position of the element in the video. |'."\n"
+ .'| Score | float | Yes | 0.9 | The confidence score of the label. Value range: [0, 1.0]. |'."\n"
+ .'| Category | string | Yes | human-real-celebrity-明星姓名 | The label name. For specific categories, see the "Category label values" figure below. |'."\n"
+ ."\n"
+ .'## Category tag values'."\n"
+ .'![Category标签取值](https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/imagerecog/Image%201.png).'."\n"
+ ."\n"
+ .'## Query results'."\n"
+ .'This is an asynchronous operation that does not return actual results immediately. 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 ad image analysis feature under the Alibaba Cloud Vision AI image recognition category, we recommend using the SDK. The SDK supports multiple programming languages. When making calls, select the SDK package for the image recognition (imagerecog) AI category. File parameters can be passed as local files or any URL 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 [Ad image analysis sample code](~~601117~~). 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 ad image analysis, see [Common error codes](~~145022~~).'."\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' => '2022-10-17T02:04:34.000Z', 'description' => 'Response parameters changed'],
+ ['createdAt' => '2021-08-04T09:35:30.000Z', 'description' => 'OpenAPI offline'],
+ ['createdAt' => '2021-08-04T09:35:30.000Z', 'description' => 'Request parameters changed'],
+ ['createdAt' => '2021-08-04T09:35:30.000Z', 'description' => 'Response parameters changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'TaggingAdImage'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:TaggingAdImage',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"66FC3009-9A7A-4D29-8B70-D6EB256EF590\\",\\n \\"Data\\": {\\n \\"Styles\\": [\\n \\"technology\\"\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeImageStyleResponse>\\n <RequestId>4F7BD051-ADBE-554C-893F-654FCA8535A1</RequestId>\\n <Data>\\n <Styles>promotion</Styles>\\n <Styles>chinese</Styles>\\n </Data>\\n</RecognizeImageStyleResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
- 'RecognizeScene' => [
- 'methods' => [
- 'post',
- ],
- 'schemes' => [
- 'http',
- 'https',
- ],
+ 'TaggingImage' => [
+ 'methods' => ['post'],
+ 'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
@@ -938,185 +1217,360 @@
[
'name' => 'ImageURL',
'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'http://viapi-test.oss-cn-shanghai.aliyuncs.com/viapi-3.0domepic/imagerecog/RecognizeScene/RecognizeScene1.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 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/imagerecog/TaggingImage/TaggingImage1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
+ 'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => 'AC79F887-5CCB-42BE-8AC3-4D455EFEDB94',
- 'type' => 'string',
- ],
+ 'RequestId' => ['description' => 'The request ID.', 'type' => 'string', 'example' => '70ED13B0-BC22-576D-9CCF-1CC12FEAC477', 'title' => ''],
'Data' => [
- 'description' => '',
+ 'description' => 'The returned result data.',
+ 'type' => 'object',
'properties' => [
'Tags' => [
- 'description' => '',
+ 'description' => 'The tagging results. A maximum of five tagging results are returned. If a category label is not returned, the corresponding `confidence` value is zero.',
+ 'type' => 'array',
'items' => [
+ 'description' => '1',
+ 'type' => 'object',
'properties' => [
- 'Value' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- 'Confidence' => [
- 'description' => '',
- 'example' => '79',
- 'format' => 'float',
- 'type' => 'number',
- ],
+ 'Value' => ['description' => 'The label name. For specific values, [download the Label file](https://viapi-oss.oss-cn-shanghai.aliyuncs.com/doc/imagerecog/label.txt).', 'type' => 'string', 'example' => '沙发', 'title' => ''],
+ 'Confidence' => ['description' => 'The confidence score of the label. Valid values: 0 to 100.', 'type' => 'number', 'format' => 'float', 'example' => '65', 'title' => ''],
],
- 'type' => 'object',
+ 'title' => '',
+ 'example' => '',
],
- 'type' => 'array',
+ 'title' => '',
+ 'example' => '',
],
],
- '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\\": \\"70ED13B0-BC22-576D-9CCF-1CC12FEAC477\\",\\n \\"Data\\": {\\n \\"Tags\\": [\\n {\\n \\"Value\\": \\"沙发\\",\\n \\"Confidence\\": 65\\n }\\n ]\\n }\\n}","type":"json"}]',
+ 'title' => 'General image tagging',
+ 'summary' => 'This topic describes the syntax and provides examples of the TaggingImage operation for general image tagging.',
+ 'description' => '## Feature description'."\n"
+ .'The general image tagging feature identifies the main content in an image and assigns type labels. It supports thousands of content labels that cover common object categories.'."\n"
+ ."\n"
+ .'> - You can visit [Online Consultation](https://www.aliyun.com/core/online-consult?from=aZgW6LJHr2) for 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=imagerecog&children=TaggingImage) to experience this feature or purchase it online.'."\n"
+ .'- To consult about API access, usage, or issues related to Alibaba Cloud Vision Intelligence Open Platform, join the DingTalk group (23109592) to contact us.'."\n"
+ ."\n"
+ .'## Getting started'."\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 recognition service](https://vision.aliyun.com/imagerecog). If you have not activated the service, [activate it now](https://common-buy.aliyun.com/?commodityCode=viapi_imagerecog_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/imagerecog/2019-09-30/TaggingImage?lang=JAVA&sdkStyle=dara&params=%7B%22ImageURL%22%3A%22http%3A%2F%2Fviapi-test.oss-cn-shanghai.aliyuncs.com%2Fviapi-3.0domepic%2Fimagerecog%2FTaggingImage%2FTaggingImage1.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 and integration steps:'."\n"
+ .'- Select the SDK language you want to use from [SDK overview](~~145033~~).'."\n"
+ .'- Find the SDK package for the image recognition (imagerecog) 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 [General image tagging sample code](~~601100~~).'."\n"
+ ."\n"
+ .'7. Direct client calls: Common client-side 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 general image tagging, see [Billing overview](~~202481~~).'."\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=imagerecog&children=TaggingImage).',
+ 'requestParamsDescription' => ' ',
+ 'responseParamsDescription' => '## SDK reference'."\n"
+ .'For the general image tagging feature under the Alibaba Cloud Vision AI image recognition category, use the SDK for calls. Multiple programming languages are supported. Select the SDK package for the image recognition (imagerecog) AI 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 common programming languages, see [General image tagging sample code](~~601100~~).',
+ 'extraInfo' => '## Error codes'."\n"
+ .'For error codes of general image tagging, see [Common error codes](~~145022~~).'."\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' => '2021-08-02T07:27:34.000Z', 'description' => 'Request parameters changed'],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'TaggingImage'],
+ ],
+ ],
+ 'ramActions' => [
+ [
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:TaggingImage',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"AC79F887-5CCB-42BE-8AC3-4D455EFEDB94\\",\\n \\"Data\\": {\\n \\"Tags\\": [\\n {\\n \\"Value\\": \\"船\\",\\n \\"Confidence\\": 79\\n }\\n ]\\n }\\n}","errorExample":""},{"type":"xml","example":"<RecognizeSceneResponse>\\n <RequestId>EA5E12C8-FFEB-5710-B4F4-A9A477DED671</RequestId>\\n <Data>\\n <Tags>\\n <Confidence>83</Confidence>\\n <Value>夜景</Value>\\n </Tags>\\n <Tags>\\n <Confidence>31</Confidence>\\n <Value>海滨</Value>\\n </Tags>\\n <Tags>\\n <Confidence>13</Confidence>\\n <Value>街景</Value>\\n </Tags>\\n <Tags>\\n <Confidence>13</Confidence>\\n <Value>广场</Value>\\n </Tags>\\n <Tags>\\n <Confidence>12</Confidence>\\n <Value>船</Value>\\n </Tags>\\n </Data>\\n</RecognizeSceneResponse>","errorExample":""}]',
- 'requestParamsDescription' => ' ',
- 'responseParamsDescription' => ' ',
],
- 'TaggingAdImage' => [
- 'summary' => '广告素材分析',
- 'methods' => [
- 'post',
+ ],
+ 'endpoints' => [
+ ['regionId' => 'cn-shanghai', 'regionName' => 'China (Shanghai)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'imagerecog.cn-shanghai.aliyuncs.com', 'endpoint' => 'imagerecog.cn-shanghai.aliyuncs.com', 'vpc' => 'imagerecog-vpc.cn-shanghai.aliyuncs.com'],
+ ],
+ 'errorCodes' => [],
+ 'changeSet' => [
+ [
+ 'apis' => [
+ ['description' => 'Request parameters changed', 'api' => 'RecognizeLogo'],
],
- 'schemes' => [
- 'http',
- 'https',
+ 'createdAt' => '2022-11-10T08:56:07.000Z',
+ 'description' => '多url支持本地文件上传',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Error codes changed', 'api' => 'RecognizeImageStyle'],
],
- 'security' => [
- [
- 'AK' => [],
+ 'createdAt' => '2022-11-07T01:44:57.000Z',
+ 'description' => '调整用户和API频率',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'TaggingAdImage'],
+ ],
+ 'createdAt' => '2022-10-17T02:04:46.000Z',
+ 'description' => '修改异步任务Message为可见',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'RecognizeFood'],
+ ],
+ 'createdAt' => '2022-09-27T09:40:50.000Z',
+ 'description' => '修改obj为可见',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Error codes changed', 'api' => 'ClassifyingRubbish'],
+ ['description' => 'Error codes changed', 'api' => 'DetectFruits'],
+ ['description' => 'Error codes changed', 'api' => 'DetectImageElements'],
+ ['description' => 'Error codes changed', 'api' => 'EvaluateCertificateQuality'],
+ ['description' => 'Error codes changed', 'api' => 'RecognizeImageColor'],
+ ['description' => 'Error codes changed', 'api' => 'RecognizeVehicleType'],
+ ],
+ 'createdAt' => '2022-03-30T09:05:15.000Z',
+ 'description' => '调整用户调用频率',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Error codes changed', 'api' => 'RecognizeLogo'],
+ ],
+ 'createdAt' => '2021-12-14T09:27:28.000Z',
+ 'description' => '修改线上请求路径',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Response parameters changed', 'api' => 'TaggingAdImage'],
+ ],
+ 'createdAt' => '2021-08-10T01:41:06.000Z',
+ 'description' => '新增出参参数',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'Request parameters changed', 'api' => 'TaggingAdImage'],
+ ],
+ 'createdAt' => '2021-08-06T04:04:03.000Z',
+ 'description' => '设置imageType',
+ ],
+ [
+ 'apis' => [
+ ['description' => 'OpenAPI offline', 'api' => 'TaggingAdImage'],
+ ['description' => 'Request parameters changed', 'api' => 'TaggingImage'],
+ ],
+ 'createdAt' => '2021-08-06T04:03:23.000Z',
+ 'description' => '新增pop接口',
+ ],
+ ],
+ 'flowControl' => [
+ 'flowControlList' => [
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'GetAsyncJobResult'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DetectImageElements'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeFood'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeImageStyle'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeScene'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'TaggingAdImage'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ClassifyingRubbish'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeImageColor'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'TaggingImage'],
+ ['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'EvaluateCertificateQuality'],
+ ],
+ ],
+ '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' => 'RecognizeFood',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:RecognizeFood',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
],
],
- 'operationType' => 'read',
- 'deprecated' => false,
- 'systemTags' => [
- 'operationType' => 'none',
- 'riskType' => 'none',
- 'chargeType' => 'paid',
- 'tenantRelevance' => 'publicInformation',
+ [
+ 'apiName' => 'EvaluateCertificateQuality',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:EvaluateCertificateQuality',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
],
- 'parameters' => [
- [
- 'name' => 'ImageURL',
- 'in' => 'formData',
- 'schema' => [
- 'description' => '',
- 'example' => 'https://viapi-demo.oss-cn-shanghai.aliyuncs.com/viapi-demo/images/DetectImageElements/xxxx.png',
- 'isFileTransferUrl' => true,
- 'required' => true,
- 'type' => 'string',
+ [
+ 'apiName' => 'GetAsyncJobResult',
+ 'description' => '',
+ 'operationType' => 'get',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:GetAsyncJobResult',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
- 'responses' => [
- 200 => [
- 'schema' => [
- 'description' => 'Schema of Response',
- 'properties' => [
- 'RequestId' => [
- 'description' => '',
- 'example' => '572974F0-1014-5C60-97EE-DBFFC0FF7616',
- 'title' => 'Id of the request',
- 'type' => 'string',
- ],
- 'Data' => [
- 'description' => '',
- 'properties' => [
- 'TagInfo' => [
- 'description' => '',
- 'type' => 'object',
- ],
- ],
- 'type' => 'object',
- ],
- 'Message' => [
- 'description' => '',
- 'example' => '',
- 'type' => 'string',
- ],
- ],
- 'title' => 'Schema of Response',
- 'type' => 'object',
+ [
+ 'apiName' => 'ClassifyingRubbish',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:ClassifyingRubbish',
+ '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' => 'TaggingAdImage',
+ 'description' => '',
+ 'operationType' => 'none',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:TaggingAdImage',
+ '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' => 'RecognizeImageStyle',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:RecognizeImageStyle',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
- 408 => [
- [
- 'errorCode' => 'Timeout',
- 'errorMessage' => 'The request has timed out.',
+ ],
+ [
+ 'apiName' => 'RecognizeImageColor',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:RecognizeImageColor',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
- 503 => [
- [
- 'errorCode' => 'ServiceUnavailable',
- 'errorMessage' => 'The service is unavailable.',
+ ],
+ [
+ 'apiName' => 'DetectImageElements',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:DetectImageElements',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'TaggingImage',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:TaggingImage',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
+ ],
+ ],
+ ],
+ [
+ 'apiName' => 'RecognizeScene',
+ 'description' => '',
+ 'operationType' => '',
+ 'ramAction' => [
+ 'action' => 'viapi-imagerecog:RecognizeScene',
+ 'authLevel' => 'operate',
+ 'actionConditions' => [],
+ 'resources' => [
+ ['validationType' => 'always', 'product' => 'VisualIntelligenceAPI', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
- 'responseDemo' => '[{"type":"json","example":"{\\n \\"RequestId\\": \\"572974F0-1014-5C60-97EE-DBFFC0FF7616\\",\\n \\"Data\\": {\\n \\"TagInfo\\": {\\n \\"test\\": \\"test\\",\\n \\"test2\\": 1\\n }\\n },\\n \\"Message\\": \\"该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。\\"\\n}","errorExample":""},{"type":"xml","example":"<TaggingAdImageResponse>\\n <RequestId>572974F0-1014-5C60-97EE-DBFFC0FF7616</RequestId>\\n <Message>该调用为异步调用,任务已提交成功,请以requestId的值作为jobId参数调用同类目下GetAsyncJobResult接口查询任务执行状态和结果。</Message>\\n</TaggingAdImageResponse>","errorExample":""}]',
- ],
- ],
- 'endpoints' => [
- [
- 'regionId' => 'cn-shanghai',
- 'endpoint' => 'imagerecog.cn-shanghai.aliyuncs.com',
],
+ 'resourceTypes' => [],
],
];