Release Notes
Announcements
cos:GetObject, ci:CreateAIFaceBeautifyJob.cos:PutObject, ci:CreateAIFaceBeautifyJob in the authorization policy.cos:GetObject, cos:PutObject, ci:CreateAIFaceBeautifyJob (Note: GetObject corresponds to the source file resource, and PutObject corresponds to the transferred file resource).GET /<ObjectKey>?ci-process=AIFaceBeauty HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
GET /?ci-process=AIFaceBeauty&detect-url=<detect-url> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
Parameter | Meaning | Type | Required or Not |
ObjectKey | object filename, for example: folder/document.jpg. | String | Yes |
ci-process | Cloud Infinite processing capability, image enhancement fixed as AIFaceBeauty. | String | Yes |
strength | Intensity of beauty effects, value range is a floating-point number between 0 and 1, default value is 0.5. | Float | No |
detect-url | You can process any publicly accessible image link by filling in detect-url. If detect-url is not specified, the backend will default to processing ObjectKey. If detect-url is filled in, the backend will process the detect-url link, and there is no need to fill in ObjectKey. http://www.example.com/abc.jpg needs to be url-encoded, and the processed result is http%25253A%25252F%25252Fwww.example.com%25252Fabc.jpg. | String | No |
ignore-error | When this parameter is set to 1, for scenarios such as file size being too large that cause processing failure, the original image will be returned directly without reporting an error. | Integer | No |
HTTP/1.1 200 OKContent-Type: image/pngContent-Length: 98645Date: Tue, 23 Apr 2022 09:06:16 GMTStatus: 200 OKx-cos-request-id: NWFjMzQ0MDZfOTBmYTUwXzZkZV8z****[pic-content]
PUT /<ObjectKey> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth StringPic-Operations: <PicOperations>
Header Name | Description | Type |
Pic-Operations | Parameters for image operations | String |
Parameter Name | Type | Required or Not | Description |
is_pic_info | Int | No | Whether to return original image information, 0 for no return, 1 for return, default is 0 |
rules | Array | No | Processing rules, one rule corresponds to one processing result (currently supports five rules), leave blank to not perform image processing. |
Parameter Name | Type | Required or Not | Description |
bucket | String | No | The name of the target bucket for storing results, in the format BucketName-AppId. If not specified, it defaults to the current bucket. |
fileid | String | Yes | Storage path and name of the processed file. Naming rules description: For example, the source file path and name are: /p1/test1.jpg 1. An absolute path starts with /. For example, when the fileid value is /p2/test2.jpg, it means a file named test2.jpg is stored in the p2 folder. 2. A relative path does not start with /. For example, when the fileid value is p2/test2.jpg, it means a new p2 folder is created in the p1 folder, and then a file named test2.jpg is stored in the p2 folder. 3. Do not end with /, otherwise an empty filename will occur. 4. If you want the repaired image to overwrite the original image, set the fileid field to <ObjectKey>. |
rule | String | Yes | process parameter, fixed as: ci-process=AIFaceBeauty |
Node Name (Keyword) | Parent Node | Description | Type |
UploadResult | None. | Request result. | Container |
Node Name (Keyword) | Parent Node | Description | Type |
OriginalInfo | UploadResult | Image information | Container |
ProcessResults | UploadResult | Request processing result | Container |
Node Name | Parent Node | Description | Type |
Key | OriginalInfo | Original image file name | String |
Location | OriginalInfo | Original image path | String |
ETag | OriginalInfo | Original image ETag value | String |
Node Name (Keyword) | Parent Node | Description | Type |
Object | ProcessResults | Processing result of each image | Container |
Node Name (Keyword) | Parent Node | Description | Type |
Key | Object | Beauty effect image file name | String |
Location | Object | Beauty effect image link | String |
ETag | Object | Beauty effect image ETag value | String |
Size | Object | Beauty effect image size | Int |
PUT /<ObjectKey> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth StringPic-Operations:{"is_pic_info": 1,"rules": [{"fileid": "exampleobject","rule": "ci-process=AIFaceBeauty"}]}
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 645Date: Tue, 23 Apr 2022 09:06:16 GMTStatus: 200 OKServer: tencent-cix-cos-request-id: NWFjMzQ0MDZfOTBmYTUwXzZkZV8z****<UploadResult><OriginalInfo><Key>ObjectKey</Key><Location>examplebucket-1250000000.cos.ap-chengdu.myqcloud.com/filename.jpg</Location><ETag>"ed60e3598e6862d8c8443a06acfb2153"</ETag></OriginalInfo><ProcessResults><Object><Key>exampleobject</Key><Location>examplebucket-1250000000.cos.ap-chengdu.myqcloud.com/exampleobject</Location><Format/><Size>354256</Size><ETag>"521451f63c331becf533e466732c1091"</ETag></Object></ProcessResults></UploadResult>
POST /<ObjectKey> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateAuthorization: Auth StringPic-Operations: <PicOperations>
Header Name | Description | Type |
Pic-Operations | Parameters for image operations | String |
Parameter Name | Type | Required or Not | Description |
is_pic_info | Int | No | Whether to return original image information, 0 for no return, 1 for return, default is 0 |
rules | Array | No | Processing rules, one rule corresponds to one processing result (currently supports five rules), leave blank to not perform image processing. |
Parameter Name | Type | Required or Not | Description |
bucket | String | No | The name of the target bucket for storing results, in the format BucketName-AppId. If not specified, it defaults to the current bucket. |
fileid | String | Yes | Storage path and name of the processed file. Naming rules description: For example, the source file path and name are: /p1/test1.jpg 1. Starts with / is an absolute path. For example, when the fileid value is /p2/test2.jpg, it means a file named test2.jpg is stored in the p2 folder. 2. A relative path does not start with /. For example, when the fileid value is p2/test2.jpg, it means a new p2 folder is created in the p1 folder, and then a file named test2.jpg is stored in the p2 folder. 3. Do not end with /, otherwise an empty filename will occur. 4. If you want the beautified image to overwrite the original image, set the fileid field to <ObjectKey>. |
rule | String | Yes | process parameter, fixed as: ci-process=AIFaceBeauty |
Node Name (Keyword) | Parent Node | Description | Type |
UploadResult | None. | Request result. | Container |
Node Name (Keyword) | Parent Node | Description | Type |
OriginalInfo | UploadResult | Image information | Container |
ProcessResults | UploadResult | Request processing result | Container |
Node Name | Parent Node | Description | Type |
Key | UploadResult.OriginalInfo | Original image file name | String |
Location | UploadResult.OriginalInfo | Original image path | String |
ETag | UploadResult.OriginalInfo | Original image ETag value | String |
Node Name (Keyword) | Parent Node | Description | Type |
Object | UploadResult.ProcessResults | Processing result of each image | Container |
Node Name (Keyword) | Parent Node | Description | Type |
Key | UploadResult.ProcessResults.Object | Beauty effect image file name | String |
Location | UploadResult.ProcessResults.Object | Beauty effect image link | String |
ETag | UploadResult.ProcessResults.Object | Beauty effect image ETag value | String |
Size | UploadResult.ProcessResults.Object | image size | Int |
POST /<ObjectKey>?image_process HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-length: SizeAuthorization: Auth StringPic-Operations:{"rules": [{"fileid": "exampleobject","rule": "ci-process=AIFaceBeauty"}]}
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 645Date: Tue, 23 Apr 2022 09:06:16 GMTStatus: 200 OKServer: tencent-cix-cos-request-id: NWFjMzQ0MDZfOTBmYTUwXzZkZV8z****<UploadResult><OriginalInfo><Key>ObjectKey</Key><Location>examplebucket-1250000000.cos.ap-chengdu.myqcloud.com/filename.jpg</Location><ETag>"ed60e3598e6862d8c8443a06acfb2153"</ETag></OriginalInfo><ProcessResults><Object><Key>exampleobject</Key><Location>examplebucket-1250000000.cos.ap-chengdu.myqcloud.com/exampleobject</Location><Format/><Size>354256</Size><ETag>"521451f63c331becf533e466732c1091"</ETag></Object></ProcessResults></UploadResult>
피드백