v2

latestOpenAPI 3.1.0raw.githubusercontent.com2024-07-2562352.8 KB

Upscaling

Upscale the given image.

post/upscaling

Request body

face_enhanceboolean

True to enable the face enhancer model variant.

init_imagestring nullable

Input image to modify.

init_image_urlstring nullable

If given, download init_image from this URL.

model'real-esrgan-x4-plus' | 'real-esrgan-x4-v3' | 'real-esrgan-x4-v3-wdn' | 'real-esrgan-animevideo-v3' | 'real-esrgan-x4-plus-anime' | 'real-esrgan-x2-plus'

Specifies models either in the API or in server config.

output_image_encoding'jpeg' | 'png'

The image encoding types available for image modification response.

output_image_heightinteger nullable

Height in pixels of the output image. If given, neither scale nor output_image_width should be specified.

output_image_widthinteger nullable

Width in pixels of the output image. If given, neither scale nor output_image_height should be specified.

scalenumber nullable

Upscale the init image dimensions by this multiplier. If given, neither output_image_height nor output_image_width should be given.

Example request

{
  "face_enhance": true,
  "scale": 4
}

Response

Successful Response

image_b64string nullable required

The modified image or None if it was removed for safety.

removed_for_safetyboolean required

True if the image was removed for safety, False otherwise.