Pro Upscaler Precise

This guide shows how to upscale images using the Pro Upscaler Precise model via the Leonardo.AI REST API.

This guide shows how to upscale images using the Pro Upscaler Precise model via the Leonardo.AI REST API.

To learn about the benefits and best practices of this upscaler, please refer to this blog.

Sample Request

curl --location 'https://cloud.leonardo.ai/api/rest/v2/generations' \
     --header 'authorization: Bearer {api-key}' \
     --header 'Content-Type: application/json' \
     --data '{
       "model": "aurora-upscaler-precise",
       "public": false,
       "parameters": {
         "height": 848,
         "width": 1264,
         "upscale_factor": 2,
         "upscale_mode": "clean",
         "guidances": {
           "image_reference": [
             {
               "image": {
                 "id": "f823926a-ce29-4680-a599-e8af39db91b1",
                 "type": "GENERATED"
               }
             }
           ]
         }
       }
     }'

Recipes

API Request Endpoint, Headers, Parameters

Endpoint

https://cloud.leonardo.ai/api/rest/v2/generations

Headers

--header "accept: application/json" \
--header "authorization: Bearer <YOUR_API_KEY>" \
--header "content-type: application/json"

Body Parameters

ParameterTypeDefinition
heightintegerRequired. Height of input image in pixels.
modelstringRequired. Set to aurora-upscaler-precise.
parameters.upscale_factorintegerRequired. Controls Upscale Multiplier. Set to 2, 3, 4, 5, 6, or 8.
parameters.upscale_modestringRequired. Controls Fix AI Image Artifacts toggle. Set to clean to turn AI noise reduction on, or set to detailed to turn AI noise reduction off.
parameters.guidances.image_referencearrayRequired. Array of 1 image to upscale. Each each image specifies an image.id and an image.type (GENERATED or UPLOADED or VARIATION).
publicbooleanOptional. Set to false to keep result private.
widthintegerRequired. Width of input image in pixels.