Expand Image

The Image Expansion service offers a groundbreaking functionality designed to enhance digital imagery by enabling users to enlarge any image to specific width and height dimensions. This sophisticated feature not only allows generative resizing but also provides the capability to specify the direction of expansion, ensuring that users have complete control over the final appearance of their images.

This service is engineered to accommodate the need for larger image sizes without compromising on quality. The requirement that the specified width and height dimensions exceed the original image dimensions ensures that users can seamlessly scale their images up to meet various requirements, whether for professional presentations, digital marketing materials, web design, or personal use.

Body Params
file

Source image file (binary). (If this parameter is present, the other image source parameters must be empty.)

uri
length between 1 and 2083

Source image URL. (If this parameter is present, the other image source parameters must be empty.)

string
deprecated

Deprecated. Source image ID of an image previously uploaded to Picsart or result image ID from a different API. (If this parameter is present, the other image source parameters must be empty.)

string
required

The prompt.

string
deprecated

The negative prompt (don’t generate this type of images). Don't use the nagitve keywords such as 'no', e.g. don't use 'no distorted faces', use 'distorted faces'.

integer
≤ 8000
Defaults to 1024

Specify the width of the output image in pixels. The default is 1024 and the maximum acceptable value is 8000.

integer
≤ 8000
Defaults to 1024

Specify the width of the output image in pixels. The default is 1024 and the maximum acceptable value is 8000.

string
enum
Defaults to center

Use this parameter to define in which direction the source image should be expanded. Available values are:

  • center: Add pixels and expand the image from all sides. The original image will remain in the center.
  • top-left: Add pixels and expand to the top-left. The original image will remain the bottom-right corner.
  • top-right: Add pixels and expand to the top-right. The original image will remain the bottom-left corner.
  • bottom-left: Add pixels and expand to the bottom-left. The original image will remain the top-right corner.
  • bottom-right:Add pixels and expand to the bottom-right. The original image will remain the top-left corner.
Allowed:
integer
1 to 2
Defaults to 2

The number of images to generate.

string
enum
Defaults to JPG

Optionally select one of the image formats (JPG is default). Options are as follows:

  • JPG
  • PNG
  • WEBP
Allowed:
string
enum
Defaults to sync

Use this query parameter to establish the processing mode. Acceptable values are sync, async and auto (sync is default):

  • sync: issues a synchronous request, response is given when the result is ready.
  • async: forces an asynchronous request, the response, which is instantaneous, contains a "transaction_id" which is used to poll for the result.
  • auto: the processing mode decision is made by the service, which depends upon the expected processing time.
Allowed:
Responses

Language
Credentials
Header
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json