Skip to main content
POST
Upscale V2
The Upscale V2 API is deprecated and will be removed in the future.

POST Upscale V2

An indispensable tool for improving the quality of images generated by Stable Diffusion.

Request Headers

string
required

Request Body

string
required
Base64 encoded image
string|null
AI upscalers are models trained with massive amounts of data.
integer|null
Resizing mode:
number|null
The magnification factor of the image. For example, if you input upscaling_resize:2 with an image size of 512x512, it will return images of 1024x1024 (the maximum image size is 2048).
integer|null
The target image width; the maximum image size is 2048.
integer|null
The target image height; the maximum image size is 2048.
boolean|null
Zoom in after cropping.
string|null
AI upscalers are models trained with massive amounts of data.
number|null
Range [0~1], Extras upscaler 2 visibility.
number|null
Range [0~1], GFPGAN visibility.
number|null
Range [0~1], CodeFormer visibility.
number|null
Range [0~1], CodeFormer weight (0 = maximum effect, 1 = minimum effect).
integer
Image storage time (seconds). Range [0, 604800].

Response

integer
CodeNormal=0, CodeInternalError=-1, CodeInvalidJSON=1, CodeModelNotExist=2, CodeTaskIdNotExist=3, CodeInvalidAuth=4, CodeHostUnavailable=5, CodeParamRangeOutOfLimit=6, CodeCostBalanceFailure=7, CodeSamplerNotExist=8, CodeTimeout=9, CodeNotSupport=10
string
object

Example

request
response
Last modified on July 24, 2026