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
| Parameter | Description |
|---|---|
init_image | URL of source image |
prompt | Text guiding the new content |
direction | left, right, up, down, or all |
extend | Pixels to extend (multiple of 64 recommended) |