tencent cloud

Image Enhancement
Last updated: 2025-09-09 20:02:19
Image Enhancement
Last updated: 2025-09-09 20:02:19

Feature Description

Tencent Cloud Data Image processes images through the AIEnhanceImage interface.
Note:
This interface is a GET request, uses a synchronous request method, and requires a signature. For specific signature settings, please see Request Signature.

Authorization Description

When using with a sub-account, corresponding permissions must be granted. For COS permissions, please refer to COS action. For CI permissions, please refer to Cloud Infinite action.
Processing during download: Set action to authorization policy cos:GetObject, ci:CreateAIEnhanceImageJob.
Process upon upload: Set action to authorization policy cos:PutObject.
Cloud data processing: In the authorization policy, set action to cos:GetObject, cos:PutObject (Note: The resource corresponding to GetObject is the source file, and the resource corresponding to PutObject is the transferred file).

Service Activation

Using this feature requires enabling Cloud Infinite in advance and binding a bucket.
Use this feature requires enabling AI Content Recognition Service in advance through the console or API.

Use Limits

When using this API, please confirm the relevant restrictions. For details, see Usage Limits.

Fee Description

This API is a paid service. Generated costs will be charged by Cloud Infinite. For detailed billing instructions, see Content recognition.


Processing Method 1: Processing during Download

Request

Request Syntax

Original images are stored in COS.
GET /<ObjectKey>?ci-process=AIEnhanceImage&denoise=<denoise>&sharpen=<sharpen> HTTP/1.1
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>
Original image comes from another link.
GET /?ci-process=AIEnhanceImage&denoise=<denoise>&sharpen=<sharpen>&detect-url=<detect-url> HTTP/1.1
Host: <BucketName-APPID>.pic.<Region>.myqcloud.com
Date: <GMT Date>
Authorization: <Auth String>

Request Content

Operation name: AIEnhanceImage
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

Response

HTTP/1.1 200 OK
Content-Type: image/png
Content-Length: 98645
Date: Tue, 23 Apr 2022 09:06:16 GMT
Status: 200 OK
x-cos-request-id: NWFjMzQ0MDZfOTBmYTUwXzZkZV8z****

[pic-content]
The processed image is returned directly in the response body.

Processing Method 2: Process Upon Upload

Request

Request Syntax

PUT /<ObjectKey> HTTP/1.1
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
Date: GMT Date
Authorization: Auth String
Pic-Operations:
{
"is_pic_info": 1,
"rules": [{
"fileid": "exampleobject",
"rule": "ci-process=AIEnhanceImage"
}]
}
Processed images are stored in the bucket, with the value of the field fileid used as the object name.

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 645
Date: Tue, 23 Apr 2022 09:06:16 GMT
Status: 200 OK
x-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>

Processing Method 3: Cloud Data Processing

Request

POST /<ObjectKey>?image_process HTTP/1.1
Host: <BucketName-APPID>.cos.<Region>.myqcloud.com
Date: GMT Date
Content-length: Size
Authorization: Auth String
Pic-Operations:
{
"rules": [{
"fileid": "exampleobject",
"rule": "ci-process=AIEnhanceImage"
}]
}
Processed images are saved to the bucket, using the value of the field fileid as the object name.

Response

HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: 645
Date: Tue, 23 Apr 2022 09:06:16 GMT
Status: 200 OK
x-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>

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback