History
Introduction
API Category
Making API Requests
Region APIs
Instance APIs
Cloud Hosting Cluster APIs
Image APIs
Instance Launch Template APIs
Placement Group APIs
Key APIs
Security Group APIs
Network APIs
Data Types
Error Codes
cos:GetObject, ci:CreateAIEnhanceImageJob.cos:PutObject.cos:GetObject, cos:PutObject (Note: The resource corresponding to GetObject is the source file, and the resource corresponding to PutObject is the transferred file).GET /<ObjectKey>?ci-process=AIEnhanceImage&denoise=<denoise>&sharpen=<sharpen> HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
GET /?ci-process=AIEnhanceImage&denoise=<denoise>&sharpen=<sharpen>&detect-url=<detect-url> HTTP/1.1Host: <BucketName-APPID>.pic.<Region>.myqcloud.comDate: <GMT Date>Authorization: <Auth String>
Parameter | Meaning | Type | Required or Not |
ObjectKey | object filename, for example: folder/document.jpg. | String | No |
ci-process | Cloud Infinite processing capability, image enhancement fixed as AIEnhanceImage. | String | Yes |
denoise | Noise reduction strength value, value range is integers between 0 - 5. No noise reduction operation is performed when the value is 0. Default value is 3. | Integer | No |
sharpen | Sharpening strength value, value range is integers between 0 - 5. No sharpening operation is performed when the value is 0. Default value is 3. | Integer | 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. example of detect-url: http://www.example.com/abc.jpg, which needs to be url-encoded and processed into http%3A%2F%2Fwww.example.com%2Fabc.jpg. | String | No |
ignore-error | When this parameter is 1, for scenarios such as file 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:{"is_pic_info": 1,"rules": [{"fileid": "exampleobject","rule": "ci-process=AIEnhanceImage"}]}
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 645Date: Tue, 23 Apr 2022 09:06:16 GMTStatus: 200 OKx-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>?image_process HTTP/1.1Host: <BucketName-APPID>.cos.<Region>.myqcloud.comDate: GMT DateContent-length: SizeAuthorization: Auth StringPic-Operations:{"rules": [{"fileid": "exampleobject","rule": "ci-process=AIEnhanceImage"}]}
HTTP/1.1 200 OKContent-Type: application/xmlContent-Length: 645Date: Tue, 23 Apr 2022 09:06:16 GMTStatus: 200 OKx-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>
Apakah halaman ini membantu?
Anda juga dapat Menghubungi Penjualan atau Mengirimkan Tiket untuk meminta bantuan.
masukan