Stability.Ai
  1. generation
Stability.Ai
  • Getting Started
  • v1
    • user
      • account
      • balance
    • engines
      • list
    • generation
      • text-to-image
        POST
      • image-to-image
        POST
      • image-to-image/upscale
        POST
      • image-to-image/masking
        POST
  • v2alpha
    • generation
      • image-to-video
      • image-to-video/result
      • stable-image/upscale
      • stable-image/upscale/result
      • stable-image/inpaint
  1. generation

image-to-image/upscale

https://api.stability.ai
https://api.stability.ai
https://api.stability.ai
https://api.stability.ai
POST
/v1/generation/{engine_id}/image-to-image/upscale
v1/generation
Create a higher resolution version of an input image.
This operation outputs an image with a maximum pixel count of 4,194,304. This is equivalent to dimensions such as 2048x2048 and 4096x1024.
By default, the input image will be upscaled by a factor of 2. For additional control over the output dimensions, a width or height parameter may be specified.
For upscaler engines that are ESRGAN-based, refer to the RealESRGANUpscaleRequestBody body option below. For upscaler engines that are Stable Diffusion Latent Upscaler-based, refer to the LatentUpscalerUpscaleRequestBody body option below.
For more details on the upscaler engines, refer to the documentation on the Platform site.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.stability.ai/v1/generation/esrgan-v1-x2plus/image-to-image/upscale'
Response Response Example
200 - Example 1
{
    "artifacts": [
        [
            {
                "base64": "...very long string...",
                "finishReason": "SUCCESS",
                "seed": 1050625087
            },
            {
                "base64": "...very long string...",
                "finishReason": "CONTENT_FILTERED",
                "seed": 1229191277
            }
        ]
    ]
}

Request

Path Params
engine_id
string 
required
Example:
esrgan-v1-x2plus
Header Params
Accept
string 
optional
The format of the response. Leave blank for JSON, or set to 'image/png' for a PNG image.
Organization
string 
optional
Allows for requests to be scoped to an organization other than the user's default. If not provided, the user's default organization will be used.
Example:
org-123456
Stability-Client-ID
string 
optional
Used to identify the source of requests, such as the client application or sub-organization. Optional, but recommended for organizational clarity.
Example:
my-great-plugin
Stability-Client-Version
string 
optional
Used to identify the version of the application or service making the requests. Optional, but recommended for organizational clarity.
Example:
1.2.1
Body Params multipart/form-data
object {0}

Responses

🟢200Success
application/json
Body
An array of results from the generation request, where each image is a base64 encoded PNG.
artifacts
array[object (Image) {3}] 
optional
base64
string 
optional
Image encoded in base64
finishReason
enum<string> 
optional
Allowed values:
CONTENT_FILTEREDERRORSUCCESS
Example:
CONTENT_FILTERED
seed
number 
optional
The seed associated with this image
Example:
1229191277
🟠400400
🟠401401
🟠403403
🟠404404
🔴500500
Previous
image-to-image
Next
image-to-image/masking
Built with