> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelslab.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Outpainting

> This endpoint helps to outpaint by expanding the giving image.

<img src="https://mintcdn.com/mod/Xe_I2k0P2zG5615S/images/enterprise-api/image-editing/assets/images/Outpainting-f3a573d3b82f42a8177ad36204082feb.jpg?fit=max&auto=format&n=Xe_I2k0P2zG5615S&q=85&s=c16e46b2de82add1a1f0f82e93932959" alt="Outpainting endpoint result" width="691" height="518" data-path="images/enterprise-api/image-editing/assets/images/Outpainting-f3a573d3b82f42a8177ad36204082feb.jpg" />

<Warning>
  Make sure you add your [s3 details](/enterprise-api/general/update-s3-details) for `image_editing` server, so you can receive image generated in your bucket. Images generated without s3 details being added will be delete after **24hours**
</Warning>

## Request\[​

Make a `POST` request to below endpoint and pass the required parameters as a request body to the endpoint.

```curl curl theme={null}
--request POST 'https://modelslab.com/api/v1/enterprise/image_editing/outpaint' \
```

## Body

```json json theme={null}
{    
  "key": "your_api_key",    
  "seed": 12345,    
  "width": 512,    
  "height": 512,    
  "prompt": "a majestic cat house, lush greenery, filled with plants, high quality, cartoonish, realistic, 4k",    
  "image": "https://i.ibb.co/wp0w7nt/1-d212fe65-f95c-4bbe-b275-99f0dedd901a.png",    
  "negative_prompt": "dull background, text, characters, symbols, unrealistic, repetitive background, boring background, bad, low quality, black background",    
  "overlap_width": 32,    
  "num_inference_steps": 15,    
  "guidance_scale": 8.0,    
  "temp": true,    
  "base64": false,    
  "webhook": null,    
  "track_id": null
}
```

## Body Attributes

<ParamField body="key" type="string" required>
  Your API Key used for request authorization
</ParamField>

<ParamField body="prompt" type="string" default="high quality">
  The text prompt to guide image generation.
</ParamField>

<ParamField body="negative_prompt" type="string" default="low quality">
  Aspects to avoid in the generated image.
</ParamField>

<ParamField body="image" type="string" required>
  URL of the initial image to outpaint
</ParamField>

<ParamField body="width" type="integer" default="1280">
  Width of the output image. Max: 1440
</ParamField>

<ParamField body="height" type="integer" default="720">
  Height of the output image. Max: 1440
</ParamField>

<ParamField body="overlap_width" type="integer" default="10">
  Width of the mask overlap area. Max: 42
</ParamField>

<ParamField body="num_inference_steps" type="integer" default="10">
  Number of denoising steps. Max: 30
</ParamField>

<ParamField body="guidance_scale" type="number" default="8.0">
  How closely to follow the prompt
</ParamField>

<ParamField body="seed" type="integer">
  Seed for reproducible results (-1 or 0 for random)
</ParamField>

<ParamField body="temp" type="boolean" default="true">
  Whether to save output temporarily
</ParamField>

<ParamField body="base64" type="boolean" default="false">
  Whether the `image` is base64 encoded
</ParamField>

<ParamField body="webhook" type="string">
  Set a URL to get a POST API call once the image generation is complete
</ParamField>

<ParamField body="track_id" type="integer">
  This ID is returned in the response to the webhook API call. This will be used to identify the webhook request
</ParamField>
