Advanced Image Enhancer API

Try on PicWish

AI enhances image clarity with a higher-quality model for sharper details and improved resolution. It works for product photos, portraits, and design assets, with async and sync request modes.

The result image URL is valid for 1 hour. Please download and store it promptly.

Authentication

Every API request must include your API Key in the X-API-KEY request header. Send it with each request exactly as shown in the examples and parameter descriptions.

X-API-KEY: YOUR_API_KEY

Create an advanced image enhancer task

POST /api/tasks/visual/scale-pro

Body Parameters

image_url string optional

Source image URL. Supports HTTP and OSS URLs, up to 512 characters, with a 10-second download timeout. If both image_url and image_file are sent, image_file takes priority.

one required
image_file file optional

Source image file as binary data. Supported formats: jpg, jpeg, bmp, png, webp, tiff, bitmap. If both image_file and image_url are sent, image_file takes priority. Maximum file size is 30MB and maximum resolution is 4096 x 4096.

For image upload requirements, see Guidelines and Limits #5.

sync integer optional

Whether to return synchronously. 0 = async; 1 = sync.

type integer optional

Model type. 0 = Ultra HD and consumes 5 credits; 1 = HD and consumes 4 credits. Default is 0.

return_type integer optional

Result return type. 1 returns an image download URL; 2 returns a base64 string. Default is 1.

Return Parameters

status number

HTTP response status code. 200 means success, and non-200 means failure. See Status Code Definitions.

message string

Response message. If processing fails, use this message to locate the issue.

data.task_id string

Advanced image enhancer task ID used for polling.

status number

HTTP response status code. 200 means success, and non-200 means failure. See Status Code Definitions.

message string

Response message. If processing fails, use this message to locate the issue.

data.task_id string

Advanced image enhancer task ID.

data.created_at number

Task creation timestamp.

data.processed_at number

Task processing start timestamp.

data.completed_at number

Task completion timestamp.

data.image string

Result image download URL or base64 data. The URL is valid for 1 hour.

data.return_type number

Result return type.

data.type number

Model type used for this request.

data.progress number

Task progress from 0 to 100.

data.state number

Task status code. 1 means succeeded, greater than 1 means processing, and less than 0 means failed. See Status Code Definitions.

data.image_width number

Output image width.

data.image_height number

Output image height.

data.image_size_kb number

Output image size in KB.

data.out_format string

Output image format.

data.state_detail string

Detailed state message.

data.download_time number

Download time.

data.time_elapsed number

Elapsed processing time.

Query advanced image enhancer result

GET /api/tasks/visual/scale-pro/{task_id}

Path Parameters

task_id string required

The task_id returned by the task creation request. Use it to query the processing result.

Return Parameters

status number

HTTP response status code. 200 means success, and non-200 means failure. See Status Code Definitions.

message string

Response message. If processing fails, use this message to locate the issue.

data.task_id string

Advanced image enhancer task ID. If the task fails, contact support with this task_id.

data.created_at number

Task creation timestamp.

data.processed_at number

Task processing start timestamp.

data.completed_at number

Task completion timestamp.

data.image string

Result image download URL or base64 data. The URL is valid for 1 hour.

data.return_type number

Result return type.

data.type number

Model type used for this request.

data.progress number

Task progress from 0 to 100.

data.state number

Task status code. 1 means succeeded, greater than 1 means processing, and less than 0 means failed. See Status Code Definitions.

data.image_width number

Output image width.

data.image_height number

Output image height.

data.image_size_kb number

Output image size in KB.

data.out_format string

Output image format.

data.state_detail string

Detailed state message.

data.download_time number

Download time.

data.time_elapsed number

Elapsed processing time.

Guidelines and Limits

  1. The result image URL is valid for 1 hour. Please download and store it promptly.

  2. HTTP status 200 means the HTTP request succeeded, not that advanced enhancement succeeded. Check data.state for the task result. See Status Code Definitions.

  3. When passing URLs as parameters, follow URL encoding standards to prevent parameter parsing issues.

  4. type=0 consumes 5 credits; type=1 consumes 4 credits.

  5. Uploaded images must meet the following format, resolution, and file size limits.

    FormatResolutionSize
    jpg, jpeg, bmp, png, webp, tiff, bitmapUp to 4096 x 4096Up to 30MB