'1.0',
'info' => ['style' => 'RPC', 'product' => 'ivpd', 'version' => '2019-06-25'],
'directories' => [
[
'children' => ['ChangeImageSize', 'DetectImageElements', 'ExtendImageStyle', 'MakeSuperResolutionImage', 'RecognizeImageColor', 'RecognizeImageStyle', 'SegmentImage', 'RecolorImage', 'SegmentBody'],
'type' => 'directory',
'title' => 'Visual processing (deprecated)',
],
],
'components' => [
'schemas' => [],
],
'apis' => [
'ChangeImageSize' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => true,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'Width',
'in' => 'formData',
'schema' => ['description' => 'The target width. Unit: pixels. Valid values: 10 to 5000.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '5000', 'minimum' => '10', 'docRequired' => true, 'example' => '1920', 'title' => ''],
],
[
'name' => 'Height',
'in' => 'formData',
'schema' => ['description' => 'The target height. Unit: pixels. Valid values: 10 to 5000.', 'type' => 'integer', 'format' => 'int32', 'required' => true, 'maximum' => '5000', 'minimum' => '10', 'docRequired' => true, 'example' => '1080', 'title' => ''],
],
[
'name' => 'Url',
'in' => 'formData',
'schema' => ['description' => 'The URL of the original image. The URL must be publicly accessible and can be up to 8 KB in length.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://a.b.cn/1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['description' => 'The status code.', 'type' => 'string', 'example' => '0', 'title' => ''],
'Data' => [
'description' => 'The response data. For specific fields, see the structure definition.',
'type' => 'object',
'properties' => [
'Url' => ['description' => 'The URL of the output image after resizing. Note: The URL is valid for 72 hours.', 'type' => 'string', 'example' => 'http://a.b.c/2.jpg', 'title' => ''],
],
'title' => '',
'example' => '',
],
'Message' => ['description' => 'The error message. If Code is not "0", check this field for the specific error information.', 'type' => 'string', 'example' => 'success', 'title' => ''],
'RequestId' => ['description' => 'The request ID, which is automatically generated by the Alibaba Cloud system.', 'type' => 'string', 'example' => '7308917D-9E1B-4F11-8A79-0F140270E672', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"0\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://a.b.c/2.jpg\\"\\n },\\n \\"Message\\": \\"success\\",\\n \\"RequestId\\": \\"7308917D-9E1B-4F11-8A79-0F140270E672\\"\\n}","type":"json"}]',
'title' => 'Image resizing',
'summary' => 'Intelligently adjusts image dimensions, supporting multiple methods such as automatic cropping and padding.',
'description' => 'Sample image:'."\n"
."\n\n"
.'.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
'changeSet' => [
['createdAt' => '2022-02-17T10:50:47.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeImageSize'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:ChangeImageSize',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'DetectImageElements' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => true,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'Url',
'in' => 'formData',
'schema' => ['description' => 'Original image URL. Must be a publicly accessible URL with a maximum length of 8K.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://a.b.c/1.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['description' => 'Status code', 'type' => 'string', 'example' => '0', 'title' => ''],
'Data' => [
'description' => 'Response data. For specific fields, see the structure definition.',
'type' => 'object',
'properties' => [
'Elements' => [
'description' => 'Element list',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Height' => ['description' => 'Element height, in pixels', 'type' => 'integer', 'format' => 'int32', 'example' => '1920', 'title' => ''],
'Score' => ['description' => 'Recognition score. Range: \\[0.0, 1.0\\]', 'type' => 'number', 'format' => 'float', 'example' => '0.9556', 'title' => ''],
'Type' => ['description' => 'Element category', 'type' => 'string', 'example' => 'character', 'title' => ''],
'Width' => ['description' => 'Element width, in pixels', 'type' => 'integer', 'format' => 'int32', 'example' => '1080', 'title' => ''],
'X' => ['description' => 'Element x-coordinate', 'type' => 'integer', 'format' => 'int32', 'example' => '211', 'title' => ''],
'Y' => ['description' => 'Element y-coordinate', 'type' => 'integer', 'format' => 'int32', 'example' => '65', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
'Message' => ['description' => 'Error message. When the status code is not "0", check this field for the specific error information.', 'type' => 'string', 'example' => 'Success', 'title' => ''],
'RequestId' => ['description' => 'Request ID, automatically generated by the Alibaba Cloud system', 'type' => 'string', 'example' => '7308917D-9E1B-4F11-8A79-0F140270E672', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"0\\",\\n \\"Data\\": {\\n \\"Elements\\": [\\n {\\n \\"Height\\": 1920,\\n \\"Score\\": 0.9556,\\n \\"Type\\": \\"character\\",\\n \\"Width\\": 1080,\\n \\"X\\": 211,\\n \\"Y\\": 65\\n }\\n ]\\n },\\n \\"Message\\": \\"Success\\",\\n \\"RequestId\\": \\"7308917D-9E1B-4F11-8A79-0F140270E672\\"\\n}","type":"json"}]',
'title' => 'Element Recognition',
'summary' => 'Recognizes elements contained in the input image, marks their positions with bounding boxes, and classifies their basic types (person/object, decoration, and text).',
'description' => 'Recognizes elements contained in the image, marks their positions with bounding boxes, and classifies their basic types (person/object, decoration, and text). Input a single image and output the coordinate positions and corresponding types of n elements.'."\n"
."\n"
.'Diagram:'."\n"
."\n"
.'',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
'changeSet' => [
['createdAt' => '2022-02-17T11:13:58.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DetectImageElements'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:DetectImageElements',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'ExtendImageStyle' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => true,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'StyleUrl',
'in' => 'formData',
'schema' => ['description' => 'The URL of the style image. The URL must be publicly accessible and can be up to 8 KB in length.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/extend-style-style-src.jpeg', 'title' => ''],
],
[
'name' => 'MajorUrl',
'in' => 'formData',
'schema' => ['description' => 'The URL of the major image. The URL must be publicly accessible and can be up to 8 KB in length.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/extend-style-major-src.jpeg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['description' => 'The status code.', 'type' => 'string', 'example' => '0', 'title' => ''],
'Data' => [
'description' => 'The response data. For more information, see the structure definition.',
'type' => 'object',
'properties' => [
'MajorUrl' => ['description' => 'The stylized result that preserves the human figure. If the major image specified by majorUrl does not contain a human figure, an empty string is returned.', 'type' => 'string', 'example' => 'http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/filterwrapper-et3invipre-filterplan-1930545240-f79fb/2019-8-27/invi__015668930975431000123_vq9uY7.jpg?Expires=1566896697&OSSAccessKeyId=LTAIDTT5xL3nv1sI&Signature=uRh3gwFcUmJ2XcfHWQIWIMkvl3E%3D', 'title' => ''],
'Url' => ['description' => 'The stylized result of the entire image.', 'type' => 'string', 'example' => 'http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/filterwrapper-et3invipre-filterplan-1930545240-f79fb/2019-8-27/invi__015668930975431000123_vq9uY7.jpg?Expires=1566896697&OSSAccessKeyId=LTAIDTT5xL3nv1sI&Signature=uRh3gwFcUmJ2XcfHWQIWIMkvl3E%3D', 'title' => ''],
],
'title' => '',
'example' => '',
],
'Message' => ['type' => 'string', 'description' => '', 'example' => 'Success', 'title' => ''],
'RequestId' => ['type' => 'string', 'description' => '', 'example' => '7308917D-9E1B-4F11-8A79-0F140270E672', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"0\\",\\n \\"Data\\": {\\n \\"MajorUrl\\": \\"http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/filterwrapper-et3invipre-filterplan-1930545240-f79fb/2019-8-27/invi__015668930975431000123_vq9uY7.jpg?Expires=1566896697&OSSAccessKeyId=LTAIDTT5xL3nv1sI&Signature=uRh3gwFcUmJ2XcfHWQIWIMkvl3E%3D\\",\\n \\"Url\\": \\"http://luban-vgd-invi.oss-cn-hangzhou.aliyuncs.com/upload/filterwrapper-et3invipre-filterplan-1930545240-f79fb/2019-8-27/invi__015668930975431000123_vq9uY7.jpg?Expires=1566896697&OSSAccessKeyId=LTAIDTT5xL3nv1sI&Signature=uRh3gwFcUmJ2XcfHWQIWIMkvl3E%3D\\"\\n },\\n \\"Message\\": \\"Success\\",\\n \\"RequestId\\": \\"7308917D-9E1B-4F11-8A79-0F140270E672\\"\\n}","type":"json"}]',
'title' => 'Style transfer',
'summary' => 'Transfers the visual style of a specified style image to an input image, transforming visual attributes such as color and brushstrokes.',
'description' => 'Diagram'."\n"
."\n"
.'.'."\n"
."\n"
.'## Examples'."\n"
."\n"
.'Sample request:'."\n"
."\n"
.'```'."\n"
.'{'."\n"
.' "majorUrl": "http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/extend-style-major-src.jpeg",'."\n"
.' "styleUrl":"http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/extend-style-style-src.jpeg"'."\n"
.'}'."\n"
.'```'."\n"
."\n"
.'Major image + Style image = Result image'."\n"
."\n"
.' + '."\n"
.' = '."\n"
.''."\n"
."\n\n"
.'---.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
'changeSet' => [
['createdAt' => '2022-02-17T10:50:47.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ExtendImageStyle'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:ExtendImageStyle',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'MakeSuperResolutionImage' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => true,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'Url',
'in' => 'formData',
'schema' => ['description' => 'The URL of the original image. The URL must be publicly accessible and can be up to 8 KB in length.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/super-resolution-src.png', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['description' => 'The status code.', 'type' => 'string', 'example' => '0', 'title' => ''],
'Data' => [
'description' => 'The response data. For more information about the fields, see the structure definition.',
'type' => 'object',
'properties' => [
'Url' => ['description' => 'The URL of the enhanced image.', 'type' => 'string', 'example' => 'http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/super-resolution-result.png', 'title' => ''],
],
'title' => '',
'example' => '',
],
'Message' => ['type' => 'string', 'description' => '', 'example' => 'Success', 'title' => ''],
'RequestId' => ['description' => 'The request ID, which is automatically generated by the Alibaba Cloud system.', 'type' => 'string', 'example' => '7308917D-9E1B-4F11-8A79-0F140270E672', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"0\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/super-resolution-result.png\\"\\n },\\n \\"Message\\": \\"Success\\",\\n \\"RequestId\\": \\"7308917D-9E1B-4F11-8A79-0F140270E672\\"\\n}","type":"json"}]',
'title' => 'Image super-resolution/enhancement',
'summary' => 'Upscales a small image by 4x and enhances clarity based on inferred details so that the resulting image does not appear blurry.',
'description' => "\n"
."\n"
.'Original image:'."\n"
."\n"
.''."\n"
."\n"
.'Result image:'."\n"
."\n"
.''."\n"
."\n\n"
.'Request example:'."\n"
."\n"
.'```'."\n"
.'{'."\n"
.' "url": "http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/super-resolution-src.png"'."\n"
.'}'."\n"
.'```.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => 'All result image URLs are valid for 72 hours.',
'changeSet' => [
['createdAt' => '2022-02-17T10:50:47.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'MakeSuperResolutionImage'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:MakeSuperResolutionImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'RecognizeImageColor' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => true,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'Url',
'in' => 'formData',
'schema' => ['description' => 'The URL of the original image. The URL must be publicly accessible and can be up to 8 KB in length.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/recognizer-image-color-src.png', 'title' => ''],
],
[
'name' => 'ColorCount',
'in' => 'formData',
'schema' => ['description' => 'The expected number of colors in the output palette. Valid values: 1 to 7.', 'type' => 'string', 'required' => false, 'pattern' => '^\\d+$', 'default' => '3', 'docRequired' => false, 'example' => '3', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['type' => 'string', 'description' => '', 'example' => '0', 'title' => ''],
'Data' => [
'description' => 'The response data. For more information, see the structure definition.',
'type' => 'object',
'properties' => [
'ColorTemplateList' => [
'description' => 'The color palette list.',
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Color' => ['description' => 'The RGB color value in hexadecimal format, such as 291A18.', 'type' => 'string', 'example' => '291A18', 'title' => ''],
'Label' => ['description' => 'The color label, such as gray or red.', 'type' => 'string', 'example' => 'gray', 'title' => ''],
'Percentage' => ['description' => 'The proportion of the color. Valid values: 0.0 to 1.0.', 'type' => 'number', 'format' => 'float', 'example' => '0.3', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
'Message' => ['type' => 'string', 'description' => '', 'example' => 'Success', 'title' => ''],
'RequestId' => ['type' => 'string', 'description' => '', 'example' => '7308917D-9E1B-4F11-8A79-0F140270E672', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"0\\",\\n \\"Data\\": {\\n \\"ColorTemplateList\\": [\\n {\\n \\"Color\\": \\"291A18\\",\\n \\"Label\\": \\"gray\\",\\n \\"Percentage\\": 0.3\\n }\\n ]\\n },\\n \\"Message\\": \\"Success\\",\\n \\"RequestId\\": \\"7308917D-9E1B-4F11-8A79-0F140270E672\\"\\n}","type":"json"}]',
'title' => 'Color palette recognition',
'summary' => 'Analyzes the color information of an input image and returns color values in RGB and HEX formats along with their corresponding proportions.',
'description' => "\n"
.'Analyzes the color information of an input image and returns color values in RGB and HEX formats along with their corresponding proportions.'."\n"
."\n"
.'For example, given the following input image:'."\n"
."\n"
.'.'."\n"
."\n"
.'This service can extract the following color palette:'."\n"
."\n"
.'| rgb | 58/150/224 | 207/160/43 | 185/197/212 | 146/115/24 | 63/66/54 | 24/53/87 |'."\n"
.'| --- | --- | --- | --- | --- | --- | --- |'."\n"
.'| hex | 3A96E0 | CFA02B | B9C5D4 | 927318 | 3F4236 | 183557 |'."\n"
.'| Proportion | 0.374724 | 0.179412 | 0.15671 | 0.124081 | 0.0842831 | 0.0807904 |'."\n"
.'| Color (visualization) |  |  |  |  |  |  |.'."\n"
."\n"
.'Sample request:'."\n"
."\n"
.'```json'."\n"
.'{'."\n"
.' "colorCount": 5,'."\n"
.' "url": "https://invi-label.oss-cn-shanghai.aliyuncs.com/label/style/style_google/style_google_20181106_p10_247782.jpg"'."\n"
.'}'."\n"
.'```.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' ',
'changeSet' => [
['createdAt' => '2022-02-17T10:50:47.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeImageColor'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:RecognizeImageColor',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'RecognizeImageStyle' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => true,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'Url',
'in' => 'formData',
'schema' => ['description' => 'The URL of the original image. The URL must be publicly accessible and can be up to 8 KB in length.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/recoginzer-image-type-src.png', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['description' => 'The status code.', 'type' => 'string', 'example' => '0', 'title' => ''],
'Data' => [
'description' => 'The response data. For more information about the fields, see the structure definition.',
'type' => 'object',
'properties' => [
'Styles' => [
'type' => 'array',
'items' => ['description' => 'The style list.', 'type' => 'string', 'example' => 'promotion', 'title' => ''],
'description' => '',
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
'Message' => ['type' => 'string', 'description' => '', 'example' => 'Success', 'title' => ''],
'RequestId' => ['description' => 'The request ID, which is automatically generated by the Alibaba Cloud system.', 'type' => 'string', 'example' => '7308917D-9E1B-4F11-8A79-0F140270E672', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"0\\",\\n \\"Data\\": {\\n \\"Styles\\": [\\n \\"promotion\\"\\n ]\\n },\\n \\"Message\\": \\"Success\\",\\n \\"RequestId\\": \\"7308917D-9E1B-4F11-8A79-0F140270E672\\"\\n}","type":"json"}]',
'title' => 'Style recognition',
'summary' => 'Analyzes the style type of an input image and returns possible style labels.',
'description' => 'Analyzes a single image and predicts its style type.'."\n"
."\n\n"
.'For example, the style types of the following image:'."\n"
.'Visual style: Chinese style Semantic style: Elegant...'."\n"
."\n"
.'.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' Style definitions:'."\n"
.'```'."\n"
.'中国风,chinese'."\n"
.'水彩,watercolor'."\n"
.'卡通,cartoon'."\n"
.'实景,real'."\n"
.'标准,standard'."\n"
.'简洁,simple'."\n"
.'活泼,lively'."\n"
.'多彩,colourful'."\n"
.'豪华,luxury'."\n"
.'科技,technology'."\n"
.'柔美,morbidezza'."\n"
.'硬朗,strong'."\n"
.'素雅,simpleelegant'."\n"
.'高冷,coolcold'."\n"
.'促销,promotion'."\n"
.'突出,protrude'."\n"
.'```.',
'extraInfo' => ' ',
'changeSet' => [
['createdAt' => '2022-02-17T11:03:01.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeImageStyle'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:RecognizeImageStyle',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'RecolorImage' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => true,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'Url',
'in' => 'formData',
'schema' => ['description' => 'The URL of the original image. The URL must be publicly accessible and can be up to 8 KB in length.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/recolor-1-src.png', 'title' => ''],
],
[
'name' => 'Mode',
'in' => 'formData',
'schema' => ['description' => 'The recoloring mode. Default value: AUTO. Valid values:'."\n"
.'- AUTO: automatic recoloring.'."\n"
.'- TEMPLATE: color palette recoloring.'."\n"
.'- REF_PIC: reference image recoloring.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'AUTO', 'title' => ''],
],
[
'name' => 'RefUrl',
'in' => 'formData',
'schema' => ['description' => 'The URL of the reference image for reference image recoloring.', 'type' => 'string', 'required' => false, 'docRequired' => false, 'example' => 'http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/recolor-refurl-src.png', 'title' => ''],
],
[
'name' => 'ColorCount',
'in' => 'formData',
'schema' => ['description' => 'The number of extended color schemes. Valid values: 1 to 8. Default value: 1.', 'type' => 'integer', 'format' => 'int32', 'required' => false, 'maximum' => '8', 'minimum' => '1', 'default' => '1', 'docRequired' => false, 'example' => '3', 'title' => ''],
],
[
'name' => 'ColorTemplate',
'in' => 'formData',
'style' => 'repeatList',
'schema' => [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'Color' => ['description' => 'The list of top dominant colors for color palette recoloring. The color value is defined in ARGB format, such as 0A0B0C. The array size ranges from 1 to 7.', 'type' => 'string', 'required' => false, 'example' => '0A0B0C', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
'required' => false,
'maxItems' => 8,
'description' => '',
'title' => '',
'example' => '',
],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['description' => 'The status code.', 'type' => 'string', 'example' => '0', 'title' => ''],
'Data' => [
'description' => 'The response data. For more information about the fields, see the structure definition.',
'type' => 'object',
'properties' => [
'ImageList' => [
'type' => 'array',
'items' => ['description' => 'The list of URLs of the recolored images.', 'type' => 'string', 'example' => 'http://a.b.c/3.png', 'title' => ''],
'description' => '',
'title' => '',
'example' => '',
],
],
'title' => '',
'example' => '',
],
'Message' => ['type' => 'string', 'description' => '', 'example' => 'Success', 'title' => ''],
'RequestId' => ['description' => 'The request ID, which is automatically generated by the Alibaba Cloud system.', 'type' => 'string', 'example' => '7308917D-9E1B-4F11-8A79-0F140270E672', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"0\\",\\n \\"Data\\": {\\n \\"ImageList\\": [\\n \\"http://a.b.c/3.png\\"\\n ]\\n },\\n \\"Message\\": \\"Success\\",\\n \\"RequestId\\": \\"7308917D-9E1B-4F11-8A79-0F140270E672\\"\\n}","type":"json"}]',
'title' => 'Color transfer (recoloring)',
'summary' => 'Automatically performs color transfer on an input image or performs color transfer based on a specified color palette, while ensuring that visual hotspot areas are not abnormally recolored.',
'description' => "\n"
.'Sample result:'."\n"
."\n"
.'.'."\n"
."\n"
.'Sample request parameters:'."\n"
.'```'."\n"
.'Automatic recoloring:'."\n"
.'{'."\n"
.' "url": "http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/recolor-1-src.png",'."\n"
.' "mode": "AUTO",'."\n"
.' "colorCount": 3'."\n"
.'}.'."\n"
."\n"
.'Reference image recoloring:'."\n"
.'{'."\n"
.' "url": "http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/recolor-1-src.png",'."\n"
.' "refUrl": "http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/recolor-refurl-src.png",'."\n"
.' "mode": "REF_PIC"'."\n"
.'}.'."\n"
."\n"
.'Color palette recoloring:'."\n"
.'{'."\n"
.' "url": "http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/recolor-1-src.png",'."\n"
.' "colorTemplate": [ '."\n"
.' { "color": "056A6B"}, '."\n"
.' { "color": "FF0000"}, '."\n"
.' { "color": "00FF00"}, '."\n"
.' { "color": "0000FF"}'."\n"
.' ],'."\n"
.' "mode": "TEMPLATE"'."\n"
.'}'."\n"
.'```.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' All result image URLs are valid for 72 hours.',
'changeSet' => [
['createdAt' => '2022-02-17T10:50:47.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecolorImage'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:RecolorImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
'SegmentBody' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => true,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'ImageUrl',
'in' => 'formData',
'schema' => ['type' => 'string', 'required' => true, 'description' => '', 'title' => '', 'example' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['type' => 'string', 'description' => '', 'title' => '', 'example' => ''],
'Data' => [
'type' => 'object',
'properties' => [
'ImageUrl' => ['type' => 'string', 'description' => '', 'title' => '', 'example' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
'Message' => ['type' => 'string', 'description' => '', 'title' => '', 'example' => ''],
'RequestId' => ['type' => 'string', 'description' => '', 'title' => '', 'example' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
'changeSet' => [
['createdAt' => '2022-02-17T10:50:47.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '300', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentBody'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:SegmentBody',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"\\",\\n \\"Data\\": {\\n \\"ImageUrl\\": \\"\\"\\n },\\n \\"Message\\": \\"\\",\\n \\"RequestId\\": \\"\\"\\n}","type":"json"}]',
'title' => '',
'summary' => '',
],
'SegmentImage' => [
'methods' => ['post', 'get'],
'schemes' => ['http', 'https'],
'security' => [
[
'AK' => [],
],
],
'operationType' => 'readAndWrite',
'deprecated' => true,
'systemTags' => ['operationType' => 'update'],
'parameters' => [
[
'name' => 'Url',
'in' => 'formData',
'schema' => ['description' => 'The URL of the original image. The URL must be publicly accessible and can be up to 8 KB in length.', 'type' => 'string', 'required' => true, 'docRequired' => true, 'example' => 'http://vigen-invi-cdn.alibaba.com/aliyun-doc/pop/images/segment-image-src.jpg', 'title' => ''],
],
],
'responses' => [
200 => [
'schema' => [
'type' => 'object',
'properties' => [
'Code' => ['description' => 'The status code.', 'type' => 'string', 'example' => '0', 'title' => ''],
'Data' => [
'description' => 'The result data. Expand this parameter for details.',
'type' => 'object',
'properties' => [
'Url' => ['description' => 'The URL of the segmentation result image.', 'type' => 'string', 'example' => 'http://a.b.c/2.png', 'title' => ''],
],
'title' => '',
'example' => '',
],
'Message' => ['type' => 'string', 'description' => '', 'example' => 'Success', 'title' => ''],
'RequestId' => ['description' => 'The request ID, which is automatically generated by the Alibaba Cloud system.', 'type' => 'string', 'example' => '7308917D-9E1B-4F11-8A79-0F140270E672', 'title' => ''],
],
'description' => '',
'title' => '',
'example' => '',
],
],
],
'staticInfo' => ['noSubstitutionReason' => '无替代API,历史原因导致该API被标记为弃用。'],
'responseDemo' => '[{"errorExample":"","example":"{\\n \\"Code\\": \\"0\\",\\n \\"Data\\": {\\n \\"Url\\": \\"http://a.b.c/2.png\\"\\n },\\n \\"Message\\": \\"Success\\",\\n \\"RequestId\\": \\"7308917D-9E1B-4F11-8A79-0F140270E672\\"\\n}","type":"json"}]',
'title' => 'Image segmentation (matting)',
'summary' => 'Performs general-purpose segmentation on the main subject in an input image and outputs a corresponding PNG image with a transparent background. Supports subjects including human bodies, animals, and objects.',
'description' => 'Sample image:'."\n"
."\n"
.'.',
'requestParamsDescription' => ' ',
'responseParamsDescription' => ' ',
'extraInfo' => ' All result image URLs are valid for 72 hours.',
'changeSet' => [
['createdAt' => '2022-02-17T10:05:02.000Z', 'description' => 'Error codes changed'],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentImage'],
],
],
'ramActions' => [
[
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:SegmentImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
],
],
'endpoints' => [
['regionId' => 'cn-hangzhou', 'regionName' => 'China (Hangzhou)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'ivpd.cn-hangzhou.aliyuncs.com', 'endpoint' => 'ivpd.cn-hangzhou.aliyuncs.com', 'vpc' => 'ivpd-vpc.cn-hangzhou.aliyuncs.com'],
['regionId' => 'cn-huhehaote', 'regionName' => 'China (Hohhot)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'ivpd.cn-huhehaote.aliyuncs.com', 'endpoint' => 'ivpd.cn-huhehaote.aliyuncs.com', 'vpc' => ''],
['regionId' => 'cn-shanghai', 'regionName' => 'China (Shanghai)', 'areaId' => 'asiaPacific', 'areaName' => 'Asia Pacific', 'public' => 'ivpd.cn-shanghai.aliyuncs.com', 'endpoint' => 'ivpd.cn-shanghai.aliyuncs.com', 'vpc' => 'ivpd-vpc.cn-shanghai.aliyuncs.com'],
],
'errorCodes' => [
['code' => '0', 'message' => 'Success', 'http_code' => 200, 'description' => 'Success'],
['code' => 'AuthFailed', 'message' => 'An error occurred while performing authorization. Please check your RAM configuration.', 'http_code' => 403, 'description' => 'An error occurred while performing authorization. Please check your RAM configuration.'],
['code' => 'InternalServerError', 'message' => 'A server error occurred while processing your request.', 'http_code' => 500, 'description' => 'A server error occurred while processing your request.'],
['code' => 'InvalidContent', 'message' => 'The specified content is invalid.', 'http_code' => 417, 'description' => 'The specified content is invalid.'],
['code' => 'InvalidContentLength', 'message' => 'The length of content exceeds the limit.', 'http_code' => 413, 'description' => 'The length of content exceeds the limit.'],
['code' => 'NeedOpen', 'message' => 'Please activate the service first.', 'http_code' => 403, 'description' => 'Please activate the service first.'],
['code' => 'NotEnoughBalance', 'message' => 'Your account does not have enough balance.', 'http_code' => 403, 'description' => 'Your account does not have enough balance.'],
['code' => 'ParameterError', 'message' => 'The parameter is invalid. Please check again.', 'http_code' => 400, 'description' => 'The parameter is invalid. Please check again.'],
['code' => 'RequestErrorNeedRetry', 'message' => 'An error occurred while processing your request. Please try again.', 'http_code' => 449, 'description' => 'An error occurred while processing your request. Please try again.'],
['code' => 'ServiceUnavailable', 'message' => 'The service is unavailable.', 'http_code' => 503, 'description' => 'The service is unavailable.'],
['code' => 'Timeout', 'message' => 'The request has timed out.', 'http_code' => 408, 'description' => 'The request has timed out.'],
],
'changeSet' => [
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'SegmentImage'],
],
'createdAt' => '2022-02-18T03:00:45.000Z',
'description' => '更新未弃用状态',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'ChangeImageSize'],
['description' => 'Error codes changed', 'api' => 'ExtendImageStyle'],
['description' => 'Error codes changed', 'api' => 'MakeSuperResolutionImage'],
['description' => 'Error codes changed', 'api' => 'RecognizeImageColor'],
['description' => 'Error codes changed', 'api' => 'RecolorImage'],
['description' => 'Error codes changed', 'api' => 'SegmentBody'],
],
'createdAt' => '2022-02-18T03:00:40.000Z',
'description' => '废弃API',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'CreateSegmentBodyJob'],
['description' => 'Error codes changed', 'api' => 'DetectImageElements'],
['description' => 'Error codes changed', 'api' => 'GetAsyncResult'],
['description' => 'Error codes changed', 'api' => 'SegmentCommodity'],
],
'createdAt' => '2022-02-18T03:00:23.000Z',
'description' => '废弃API',
],
[
'apis' => [
['description' => 'Error codes changed', 'api' => 'EraseLogoInVideo'],
['description' => 'Error codes changed', 'api' => 'GetAsyncJobResult'],
['description' => 'Error codes changed', 'api' => 'GetJobResult'],
['description' => 'Error codes changed', 'api' => 'GetJobStatus'],
['description' => 'Error codes changed', 'api' => 'GetUserBucketConfig'],
['description' => 'Error codes changed', 'api' => 'ListPackageDesignModelTypes'],
['description' => 'Error codes changed', 'api' => 'ListUserBuckets'],
['description' => 'Error codes changed', 'api' => 'RecognizeImageStyle'],
['description' => 'Error codes changed', 'api' => 'UpdateUserBucketConfig'],
],
'createdAt' => '2022-02-18T02:59:54.000Z',
'description' => '废弃API',
],
],
'flowControl' => [
'flowControlList' => [
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ExtendImageStyle'],
['threshold' => '300', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentBody'],
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'DetectImageElements'],
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'ChangeImageSize'],
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeImageStyle'],
['threshold' => '100', 'countWindow' => 1, 'regionId' => '*', 'api' => 'SegmentImage'],
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'MakeSuperResolutionImage'],
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecognizeImageColor'],
['threshold' => '10', 'countWindow' => 1, 'regionId' => '*', 'api' => 'RecolorImage'],
],
],
'ram' => [
'productCode' => 'IVPD',
'productName' => 'Intelligent Visual Production',
'ramCodes' => ['ivpd'],
'ramLevel' => 'SERVICE',
'ramConditions' => [
[
'name' => 'ivpd:CurrentTime',
'schema' => ['type' => 'DATEANDTIME', 'description' => ''],
],
[
'name' => 'ivpd:SecureTransport',
'schema' => ['type' => 'BOOLEAN', 'description' => ''],
],
[
'name' => 'ivpd:SourceIp',
'schema' => ['type' => 'IPADDRESS', 'description' => ''],
],
[
'name' => 'ivpd:MFAPresent',
'schema' => ['type' => 'BOOLEAN', 'description' => ''],
],
],
'ramActions' => [
[
'apiName' => 'RecolorImage',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:RecolorImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ExtendImageStyle',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:ExtendImageStyle',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'DetectImageElements',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:DetectImageElements',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentBody',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:SegmentBody',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'RecognizeImageStyle',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:RecognizeImageStyle',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'SegmentImage',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:SegmentImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'RecognizeImageColor',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:RecognizeImageColor',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'ChangeImageSize',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:ChangeImageSize',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
[
'apiName' => 'MakeSuperResolutionImage',
'description' => '',
'operationType' => 'update',
'ramAction' => [
'action' => 'ivpd:MakeSuperResolutionImage',
'authLevel' => 'operate',
'actionConditions' => [],
'resources' => [
['validationType' => 'always', 'product' => 'IVPD', 'resourceType' => 'All Resource', 'arn' => '*'],
],
],
],
],
'resourceTypes' => [
['validationType' => 'always', 'resourceType' => 'IvpdVirtual', 'arn' => 'acs:ivpd::{#accountId}:IvpdVirtual/*'],
],
],
];