---
title: "Upscaling"
method: POST
path: "/upscaling"
---

# Upscaling

`POST /upscaling`

Upscale the given image.

## Request body

- UpscalingRequest — Generate one or more images based on the given parameters.
  - `face_enhance` boolean — True to enable the face enhancer model variant.
  - `init_image` string, nullable — Input image to modify.
  - `init_image_url` string, 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_height` integer, nullable — Height in pixels of the output image. If given, neither scale nor output_image_width should be specified.
  - `output_image_width` integer, nullable — Width in pixels of the output image. If given, neither scale nor output_image_height should be specified.
  - `scale` number, nullable — Upscale the init image dimensions by this multiplier. If given, neither output_image_height nor output_image_width should be given.

## Response `200`

Successful Response

- ImageResponse — Represent a generated image.
  - `image_b64` string, nullable, required — The modified image or None if it was removed for safety.
  - `removed_for_safety` boolean, required — True if the image was removed for safety, False otherwise.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/octoml/apis/media-utilities-api.md) · [All operations](https://skmtc.net/octoml/apis/media-utilities-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/octoml/media-utilities-api/revisions/24ca8e2b43f8/schema)
