[Alpha] AI Upscale

Warning: AI Upscale is available as an alpha feature.

This means that the feature (or parts of it) might be deprecated with two week warning.

The Image Editing API allows you to upscale an input image.

AI Upscale increases the resolution of your input image by 4.

For example, if you send an input image with resolution 300x400, then AI Upscale will turn it into an image of resolution 1200x1600.

Please note that AI Upscale is currently limited to images with a maximum resolution of:

  • 1,000x1,000 pixels for the mode ai.fast

  • 512x512 for the mode ai.slow

Two upscale modes are available:

  • Fast mode

  • Slow mode

In general, slow mode should produce results of a higher quality than fast mode.

However, we do recommend that you try both modes: for specific type of images, one might give better results than the other.

To upscale an image, set the argument upscale.mode to the value ai.fast or ai.slow:

(original image)

upscale.mode=ai.fast

upscale.mode=ai.slow

If you want to give it a try, here are the code snippets to reproduce the examples above:

curl --request POST \
  --url https://image-api.photoroom.com/v2/edit \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'imageFile=@"/path/to/image.jpeg"' \
  --form 'referenceBox="originalImage"' \
  --form 'removeBackground="false"' \
  --form 'upscale.mode="ai.fast"' \
  --output result-ai-fast.png
curl --request POST \
  --url https://image-api.photoroom.com/v2/edit \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'imageFile=@"/path/to/image.jpeg"' \
  --form 'referenceBox="originalImage"' \
  --form 'removeBackground="false"' \
  --form 'upscale.mode="ai.slow"' \
  --output result-ai-slow.png

Additional Examples

Below you can find some additional examples of using AI Upscale, with different type of images:

Make sure to click on the images to see them in full resolution.

(original image)

upscale.mode=ai.fast

upscale.mode=ai.slow

Last updated