Upscale with Universal Upscaler

Follow this recipe to create high resolution upscale images using Universal Upscaler.


Upscaling using Universal Upscaler

The guide will recreate the following functionality in the Web UI via API.

Universal Upscaler on Leonardo.AI Web

Universal Upscaler on Leonardo.AI Web

Upscale settings in Universal Upscaler

Upscale settings in Universal Upscaler

Upscaler Styles available

StyleValue
GeneralGENERAL
2D Art & Illustration2D ART & ILLUSTRATION
CinematicCINEMATIC
CG Art & Game AssetsCG ART & GAME ASSETS

πŸ“˜

Tip

  • The parametercreativityStrength refers to how 'creative' the AI will be on the original image. The higher it is, the more details will be applied.
  • The upscaleMultiplier must be between 1 and 2. The bigger the value, the higher the resolution.
  • The maximum upscaled image size is 20MP.

Sample Request

curl --request GET \
     --url https://cloud.leonardo.ai/api/rest/v1/generations/<YOUR_GENERATION_ID> \
     --header 'accept: application/json' \
     --header 'authorization: Bearer <YOUR_API_KEY>'

{
  "upscalerStyle": "CINEMATIC",
  "creativityStrength": 8,
  "upscaleMultiplier": 2,
  "generatedImageId": "<YOUR_GENERATED_IMAGE_ID>",
}

Ensure that you run the Get Variation ID endpoint to retrieve the image URL after this step

Cost

The cost is based on the output megapixel size.

MegapixelsCredits
1-560
680
7100
8120
9140
10160
11180
12200
13220
14240
15260
16280
17300
18320
19340
20360