SnapEditDocs
API HomeGet API Key
API Reference

Expand image (outpaint)

expand-image-outpaint

Expand an image beyond its original boundaries. Requires both the source image and a mask indicating the expansion area.

post/v1/images/outpaint

Credit cost: 15

Authorization β€” This endpoint requires an API key. Pass it in the api-key header on every request. See the quickstart

Body

NameTypeStatusDescription
input_image
fileRequiredImage file or URL to outpaint.
input_mask
fileRequiredMask image file or URL defining the area to generate.

Responses

Image outpainted successfullySingleImageResponse

NameTypeDescription
createdintegerUnix timestamp of when the response was created
dataobject[]
urlstringURL to download the result image
curl -X POST "https://api.snapapi.ai/v1/images/outpaint" \
  -H "api-key: YOUR_API_KEY" \
  -F "input_image=@./image.jpg" \
  -F "input_mask=@./image.png"
Response
{
  "created": 1745827200,
  "data": [
    {
      "url": "https://outputs.snapapi.ai/outputs/abc123.png"
    }
  ]
}

Examples

(1 example)

Input

Input 1Input 2

Output

Output