Skip to content
Stable Diffusion API

Outpainting API — Extend Images with AI

Extend images beyond their original borders with AI outpainting. Send a POST request to outpaint left, right, up, or down.

Outpainting

Outpainting extends an image beyond its original borders, generating new content that continues the scene.

Request

curl -X POST 'https://stablediffusionapi.com/api/v3/outpaint' \
  -H 'Content-Type: application/json' \
  -d '{
    "key": "YOUR_API_KEY",
    "init_image": "https://example.com/photo.jpg",
    "prompt": "a wider view of the same scene",
    "direction": "right",
    "extend": 256
  }'

Parameters

ParameterDescription
init_imageURL of source image
promptText guiding the new content
directionleft, right, up, down, or all
extendPixels to extend (multiple of 64 recommended)