Image Upscaling API Reference

Image Upscaling

GET/POST /ai/super/resolution

Image Upscaling can enlarge the resolution of the input image by 2 to 4 times, effectively enhancing the quality of low-resolution images, improving image textures and details, and significantly increasing image clarity and overall quality.

Request Parameters

Parameter
Type
Required
Description

imageUrl

String

Yes

URL for image. The URL must be accessible from public Internet and can not be private network address like 'localhost'.

Input image size should be between 100×100 pixels(minimum) and 3000×3000 pixels(maximum).

Sample: http://example.jpg/

upscaleFactor

Number

Yes

Set the upscaling factor for the image. If not set, the default is 2x upscaling.

Range:2-4

Sample: 2

Sample Request

IopClient client = new IopClientImp(url, appkey, appSecret);
IopRequest request = new IopRequest();
// Adding this trial tag in header means using the trial resource to test, 
// request.addHeaderParameter("x-iop-trial","true")
request.setApiName("/ai/super/resolution");
request.addApiParameter("upscaleFactor", "2");
request.addApiParameter("imageUrl", "https://ae01.alicdn.com/kf/S99cb7e78ba2b46cc9134b87c323bb617x.png");
IopResponse response = client.execute(request);
System.out.println(response.getBody());
Thread.sleep(10);

Response Parameters

Parameter
Type
Description

resCode

Number

The returned result code, where 200 indicates success. For detailed error codes, please refer to the error code list.

data

Object

The returned result data.

requestId

String

A unique request ID used for troubleshooting.

success

Boolean

The status of the returned request, indicating whether the request was successful.

resMessage

String

The returned request information.

Sample Response

Errors

Error Code
Error Message
Description

500

system error

System error.

501

rate limit exceed

The current interface has reached the current limit. Please contact us via navigation bar or email us ([email protected]) to increase the current limit value.

700

invalid input

The format of the input parameters does not meet the requirements, and resMessage will return detailed fields that do not meet the requirements.

801

model failed

Internal call exception, please contact us via navigation bar or email us ([email protected]) for troubleshooting.

1000

content has sensitive data, please try other input

Content has sensitive data and cannot be handled now. Please try other input.

1001

content control failed, please retry

Content risk failed, please try other input. If an error persists,please contact us via navigation bar or email us ([email protected]).

1002

content risk filter failed, please contact us

Content risk filter failed, please contact us via navigation bar or email us ([email protected]).

Last updated

Was this helpful?