# Out Painting > Expand images seamlessly beyond borders with **outpainting AI** for images; supports 128-2048px dims (div by 64), strength 0-1, 1-100 steps, blur for smooth transitions.[1][2][3] ## Overview - **Model ID**: `outpainting` - **Category**: image - **Provider**: modelslab - **Status**: model_ready - **Screenshot**: `https://assets.modelslab.com/generations/58f8b236-530f-43a5-b5c4-136365516e7f.webp` ## API Information This model can be used via our HTTP API. See the API documentation and usage examples below. ### Endpoint - **URL**: `https://modelslab.com/api/v8/images/outpaint` - **Method**: POST ### Parameters - **`prompt`** (required): - Type: textarea - **`image`** (required): - Type: file ( "image/jpeg,image/png") - **`negative_prompt`** (optional): - Type: textarea - **`width`** (required): - Type: number (range: 512-1024) - **`height`** (required): - Type: number (range: 512-1024) - **`model_id`** (optional): - Type: text ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v8/images/outpaint \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "outpainting", "prompt": "middle of the street, buildings in the background", "image": "https://assets.modelslab.com/generations/e3d918c7-a596-4139-a920-9e6d1d3e9cc7", "negative_prompt": "dull background, text, characters, symbols, unrealistic, repetitive background, boring background, bad, low quality, black background", "width": "1024", "height": "512" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v8/images/outpaint", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "outpainting", "prompt": "middle of the street, buildings in the background", "image": "https://assets.modelslab.com/generations/e3d918c7-a596-4139-a920-9e6d1d3e9cc7", "negative_prompt": "dull background, text, characters, symbols, unrealistic, repetitive background, boring background, bad, low quality, black background", "width": "1024", "height": "512" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v8/images/outpaint", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "outpainting", "prompt": "middle of the street, buildings in the background", "image": "https://assets.modelslab.com/generations/e3d918c7-a596-4139-a920-9e6d1d3e9cc7", "negative_prompt": "dull background, text, characters, symbols, unrealistic, repetitive background, boring background, bad, low quality, black background", "width": "1024", "height": "512" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/extend-image-outpainting/outpainting) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)