⚡ NEW: Flux Klein 9B — Faster inference, stunning quality · Try Now
curl --request POST \
--url https://modelslab.com/api/v6/image_editing/outpaint \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"image": "<string>",
"prompt": "high quality",
"negative_prompt": "low quality",
"width": 1280,
"height": 720,
"overlap_width": 10,
"num_inference_steps": 10,
"guidance_scale": 8,
"seed": 123,
"temp": true,
"base64": false,
"webhook": "<string>",
"track_id": 123
}
'{
"generationTime": 123,
"id": 123,
"output": [
"<string>"
],
"proxy_links": [
"<string>"
],
"meta": {}
}This endpoint helps to outpaint by expanding the giving image.
curl --request POST \
--url https://modelslab.com/api/v6/image_editing/outpaint \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"image": "<string>",
"prompt": "high quality",
"negative_prompt": "low quality",
"width": 1280,
"height": 720,
"overlap_width": 10,
"num_inference_steps": 10,
"guidance_scale": 8,
"seed": 123,
"temp": true,
"base64": false,
"webhook": "<string>",
"track_id": 123
}
'{
"generationTime": 123,
"id": 123,
"output": [
"<string>"
],
"proxy_links": [
"<string>"
],
"meta": {}
}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.

POST request to below endpoint and pass the required parameters as a request body to the endpoint.
--request POST 'https://modelslab.com/api/v6/image_editing/outpaint' \
{
"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
}
Your API Key used for request authorization
URL of the initial image to outpaint
The text prompt to guide image generation
Aspects to avoid in the generated image
Width of the output image
x <= 1440Height of the output image
x <= 1440Width of the mask overlap area
x <= 42Number of denoising steps
x <= 30How closely to follow the prompt
Seed for reproducible results
Whether to save output temporarily
Whether the image is base64 encoded
URL to receive POST API call when complete
ID for webhook identification
Outpainting response
success Time taken to generate the image in seconds
Unique identifier for the generation request
Array of generated image URLs
Array of proxy image URLs
Metadata about the generation process
Was this page helpful?