Lossless Upscaling

Try on PicWish

Upscale photos or illustrations by 2x, 4x, 8x, or 16x, with a choice of model style and noise reduction strength.

Result image URLs are generally valid for 1 hour. Please download and store them 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 a lossless upscaling task

POST /api/tasks/visual/advanced-scale

Body Parameters

image_url string optional

Image download URL. Provide at least one of image_url or image_file; image_file takes precedence when both are supplied. Supports HTTP and OSS, up to 512 characters, with a 20-second download timeout.

one required
image_file file optional

Source image file as binary data. Provide at least one of image_file or image_url; image_file takes precedence when both are supplied. The image received by the server must not exceed 50MB, including 50MB.

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

scale_factor string optional

Upscaling factor. Send the option value, not the actual scale factor.

  • 1:2x (default)
  • 2:4x
  • 3:8x
  • 4:16x
style string optional

Choose a model style.

  • photo:Photograph (default)
  • art:Cartoon or illustration
noise string optional

Noise reduction strength.

  • -1:None (default)
  • 0:Low
  • 1:Medium
  • 2:High
  • 3:Highest
output_format string optional

Output image format. Accepts jpg, png, or an empty value.

Return Parameters

status integer

HTTP response status code: 200 means the request succeeded; non-200 means it failed. See Status Code Definitions.

message string

Response message. If processing fails, refer to this field or contact sales or technical support with the error message and task_id.

data.task_id string

Lossless upscaling task ID. Use it to query the result and include it when contacting support about a failed task.

Query lossless upscaling result

For asynchronous requests, poll the result once every 1 second. The maximum polling duration for this API is 600 seconds; if the total polling time exceeds this without a result, treat it as a timeout failure.

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

Path Parameters

task_id string required

Task ID returned when the lossless upscaling task was created.

Return Parameters

status integer

HTTP response status code: 200 means the request succeeded; non-200 means it failed. See Status Code Definitions.

message string

Response message. If processing fails, refer to this field or contact sales or technical support with the error message and task_id.

data.task_id string

Lossless upscaling task ID. Use it to query the result and include it when contacting support about a failed task.

data.image string

Upscaled result image URL or base64 data. Result URLs are generally valid for 1 hour.

data.created_at integer

Timestamp of task creation.

data.processed_at integer

Timestamp when the task started processing.

data.completed_at integer

Timestamp of task completion.

data.progress integer

Task progress from 0 to 100. 100 indicates completion; less than 100 indicates processing. Check data.state to determine success or failure.

data.state integer

Task status code. See Status Code Definitions.

  • 1: Succeeded;
  • > 1: Processing;
  • < 0: Failed.
data.state_detail string

Detailed task status.

data.time_elapsed string

Elapsed processing time.

data.return_type integer

Result return method.

data.cost number

Cost value returned by the API.

data.use_point integer

Credits consumed by this task. Each successful call consumes 3 credits.

Guidelines and Limits

  1. Result image URLs are generally valid for 1 hour. Please download and store them promptly.

  2. HTTP status 200 only means the HTTP request succeeded. data.state = 1 means upscaling succeeded; data.state < 0 means it failed. Stop polling on either success or failure.

  3. Follow URL encoding standards when passing URLs to prevent parameter parsing issues.

  4. Processing usually takes 1–2 minutes, depending on image size, and never exceeds 10 minutes.

  5. The default QPS limit is 2. Contact sales for a higher limit. Each successful call consumes 3 credits.

  6. Uploaded images must meet the following format and file size limits.

    FormatFile size
    jpg, jpeg, bmp, png, webpUp to 50MB (inclusive)