Upscale your images to a higher resolution with the Upscaling API. Your input image can have a minimum resolution of 256x256 and a maximum resolution of 2048x2048, and can be upscaled to a maximum resolution of 8192x8192.

OctoAI’s Upscaling API supports models 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

You need to create an OctoAI Authentication Token to access this API.

How to use

Invoke https://image.octoai.run/upscaling endpoint with a POST request.

The headers of the request must include an Authentication Token in the authorization field. The accept header should be set to application/json to receive the image encoded as base64 in a JSON response.

Required parameters are:

  • init_image (string, required): base64-encoded image to upscale.
  • init_image_url (string, required if init_image not provided): The URL to an image to upscale.
  • scale (float,required): Factor by which to scale the input resolution by (e.g., scale: 2.0 would double the input width and height)
  • output_image_height (integer, required if scale not provided): height of the desired upscaled image in pixels. The corresponding width will be computed off of this value to preserve the aspect ratio.
  • output_image_width (integer, required if scale not provided): width of the desired upscaled image in pixels. The corresponding height will be computed off of this value to preserve the aspect ratio.

For more details about all parameters, please see the request schema below.

Output

Upscaled image. Max support resolution 8192X8192.

Pricing

*** $0.004*** per API request

Check Pricing Page for more details.

Request Details

Headers:

Authorization (Required): Your OCTOAI_TOKEN
Content-Type (Required): Set to application/json

Parameters:

  • init_image (string, required): base64-encoded image to upscale.

  • init_image_url (string, required if init_image not provided): The URL to an image to upscale.

  • scale (float,required): Factor by which to scale the input resolution by (e.g., scale: 2.0 would double the input width and height)

  • output_image_height (integer, required if scale not provided): height of the desired upscaled image in pixels. The corresponding width will be computed off of this value to preserve the aspect ratio.

  • output_image_width (integer, required if scale not provided): width of the desired upscaled image in pixels. The corresponding height will be computed off of this value to preserve the aspect ratio.

  • model (string, optional): The model to use for upscaling faces. Default value is real-esrgan-x4-plus.

    Supported models:

    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
## Response
- `image_b64` (string): Base64-encoded png containing the processed image.
### **Request Examples**