Skip to main content
POST
cURL

Authorizations

Authorization
string
header
required

Your Stability API key, sent as a bearer token in the Authorization header.

Headers

stability-client-id
string

The name of your application, used to help us communicate app-specific debugging or moderation issues to you.

Maximum string length: 256
Example:

"my-awesome-app"

stability-client-user-id
string

A unique identifier for your end user. Used to help us communicate user-specific debugging or moderation issues to you. Feel free to obfuscate this value to protect user privacy.

Maximum string length: 256
Example:

"DiscordUser#9999"

stability-client-version
string

The version of your application, used to help us communicate version-specific debugging or moderation issues to you.

Maximum string length: 256
Example:

"1.2.1"

Body

multipart/form-data
image
file
required

The image you wish to upscale.

Supported Formats:

  • jpeg
  • png
  • webp

Validation Rules:

  • Every side must be at least 64 pixels
  • Total pixel count must be between 4,096 and 1,048,576 pixels
prompt
string
required

What you wish to see in the output image. A strong, descriptive prompt that clearly defines elements, colors, and subjects will lead to better results.

To control the weight of a given word use the format (word:weight), where word is the word you'd like to control the weight of and weight is a value between 0 and 1. For example: The sky was a crisp (blue:0.3) and (green:0.8) would convey a sky that was blue and green, but more green than blue.

Required string length: 1 - 10000
negative_prompt
string

A blurb of text describing what you do not wish to see in the output image. This is an advanced feature.

Maximum string length: 10000
output_format
enum<string>
default:png

Dictates the content-type of the generated image.

Available options:
jpeg,
png,
webp
seed
number
default:0

A specific value that is used to guide the 'randomness' of the generation. (Omit this parameter or pass 0 to use a random seed.)

Required range: 0 <= x <= 4294967294
creativity
number
default:0.3

Indicates how creative the model should be when upscaling an image. Higher values will result in more details being added to the image during upscaling.

Required range: 0.1 <= x <= 0.5
style_preset
enum<string>

Guides the image model towards a particular style.

Available options:
enhance,
anime,
photographic,
digital-art,
comic-book,
fantasy-art,
line-art,
analog-film,
neon-punk,
isometric,
low-poly,
origami,
modeling-compound,
cinematic,
3d-model,
pixel-art,
tile-texture

Response

Upscale was started.

id
string
required

The id of a generation, typically used for async generations, that can be used to check the status of the generation or retrieve the result.

Required string length: 64
Example:

"a6dc6c6e20acda010fe14d71f180658f2896ed9b4ec25aa99a6ff06c796987c4"