# OutPainting > Seamlessly expand images with intelligent edge-blending, supporting various aspect ratios and maintaining original detail. ## Overview - **Model ID**: `extend-image-outpainting` - **Category**: image - **Provider**: modelslab - **Status**: active - **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/v6/image_editing/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) - **`seed`** (optional): Seed for reproducible results - Type: number ## Usage Examples ### cURL ```bash curl --request POST \ --url https://modelslab.com/api/v6/image_editing/outpaint \ --header "Content-Type: application/json" \ --data '{ "key": "YOUR_API_KEY", "model_id": "extend-image-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", "seed": "0" }' ``` ### Python ```python import requests response = requests.post( "https://modelslab.com/api/v6/image_editing/outpaint", headers={ "Content-Type": "application/json" }, json={ "key": "YOUR_API_KEY", "model_id": "extend-image-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", "seed": "0" } ) print(response.json()) ``` ### JavaScript ```javascript fetch("https://modelslab.com/api/v6/image_editing/outpaint", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ "key": "YOUR_API_KEY", "model_id": "extend-image-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", "seed": "0" }) }) .then(response => response.json()) .then(data => console.log(data)); ``` ## Links - [Model Playground](https://modelslab.com/models/extend-image-outpainting/extend-image-outpainting) - [API Documentation](https://docs.modelslab.com) - [ModelsLab Platform](https://modelslab.com)