# Outpaint (Expand) > Expand the canvas of an image with AI-generated content that matches the existing scene. Specify percent expand on each side — required so the customer is intentional. ## Overview - **Endpoint**: `https://api.runflow.io/v1/run/runflow/outpaint` - **Model ID**: `runflow/outpaint` - **Provider**: Runflow - **License**: commercial - **Last Updated**: 2026-04-28 ## Pricing - **Base price**: $0.55/request - **Note**: Per image — outpainting / canvas expand ## Input Schema ### `image_url` (image, required) URL of the image to process. HTTPS required. ### `expand_top` (integer, required) 0–80% expand on the top edge. - **Min**: 0 - **Max**: 80 ### `file_input` (string, required) Filename inside `image_url` (e.g. `photo.png` if the zip contains `photo.png`). Frontend should set this to match the inner filename when composing the zip. ### `expand_bottom` (integer, required) 0–80% expand on the bottom edge. - **Min**: 0 - **Max**: 80 ### `expand_left` (integer, required) 0–80% expand on the left edge. - **Min**: 0 - **Max**: 80 ### `expand_right` (integer, required) 0–80% expand on the right edge. - **Min**: 0 - **Max**: 80 ## Usage Examples ### cURL ```bash curl -X POST https://api.runflow.io/v1/run/runflow/outpaint \ -H "Authorization: Bearer $RUNFLOW_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "image_url": "https://example.com/input.jpg" }' ``` ### Python ```python import requests response = requests.post( "https://api.runflow.io/v1/run/runflow/outpaint", headers={"Authorization": "Bearer RUNFLOW_API_KEY"}, json={ "image_url": "https://example.com/input.jpg", }, ) data = response.json() print(data["images"][0]["url"]) ``` ### JavaScript ```javascript const response = await fetch( "https://api.runflow.io/v1/run/runflow/outpaint", { method: "POST", headers: { "Authorization": "Bearer RUNFLOW_API_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ image_url: "https://example.com/input.jpg", }), } ); const data = await response.json(); console.log(data.images[0].url); ``` ## Additional Resources - [Playground](https://www.runflow.io/models/runflow/outpaint) - [API Reference](https://www.runflow.io/models/runflow/outpaint/api) - [Documentation](https://docs.runflow.io) - [OpenAPI](https://api.runflow.io/v1/openapi.json)