Request
- URL:
https://www.ailabapi.com/api/image/enhance/image-lossless-enlargement - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEGJPGPNGBMP - Image size: No more than 3 MB.
- Image resolution: Larger than 32x32px, smaller than 1920x1080px.
Headers
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Body
| Field | Required | Type | Scope | Default | Description |
|---|---|---|---|---|---|
image | YES | file | |||
upscale_factor | NO | integer | 2, 3, 4 | 2 | Magnification. |
mode | NO | string | base, enhancement | base | base`: Normal mode, i.e. stable super-resolution effect.`, enhancement: Enhancement mode, which has a more prominent enhancement effect than the normal mode, further improving the clarity and sharpness of the output image. |
output_format | NO | string | png, jpg, bmp | png | Output image format. Note: If the input image is in RGBA format, the output will be forced to png to preserve both RGBA format and alpha channel accuracy.If the output image resolution exceeds 3840x2160, the output format will be automatically set to jpg. |
output_quality | NO | integer | [30, 100] | 95 | Quality factor of the output image, where a higher value corresponds to higher quality. Only applicable when output_format=jpg. |
Response
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
| Field | Type | Description |
|---|---|---|
data | object | The content of the result data returned. |
+url | string | URL address of the image after resolution enlargement, image format is PNG. |
Response Example
Sample Code
Authorizations
API Key for authentication
Body
Magnification.
Image output mode. <li>base: Normal mode, i.e. stable super-resolution effect.</li> <li>enhancement: Enhancement mode, which has a more prominent enhancement effect than the normal mode, further improving the clarity and sharpness of the output image.</li>
Output image format.
Quality factor of the output image, where a higher value corresponds to higher quality. Only applicable when output_format=jpg.
Response
Success
The response is of type object.

