Interior Endpoint
Overview
Create an interior design from an image using this endpoint.
Open in Playground 🚀Request
--request POST 'https://modelslab.com/api/v6/interior/make' \
Make a POST
request to https://modelslab.com/api/v6/interior/make endpoint and pass the required parameters in the request body.
Body Attributes
Parameter | Description | Values |
---|---|---|
key | Your API Key used for authenticating your request. | String |
prompt | A text prompt describing the content you want in the generated interior image. | String |
init_image | A URL to the initial image of the room to base the design on. | URL |
negative_prompt | Descriptions of elements to avoid in the image (e.g., NSFW content, poor quality, distorted features). | String |
strength | The degree to which the prompt influences the initial image. 1.0 corresponds to full destruction of the initial image details. | float |
base64 | Specifies whether the response should be returned as a base64 string. Defaults to false . | boolean options: true or false |
num_inference_steps | The number of denoising steps. Acceptable values are 21 , 31 , or 41 . | Integer (21, 31, or 41) |
guidance_scale | The scale for classifier-free guidance. Minimum is 1 , and maximum is 20 . | Integer (1 to 20) |
temp | Indicates if temporary links should be used, valid for 24 hours. Defaults to false . | boolean options: true/false |
seed | Seed for reproducibility. The same seed generates the same image. Use null for a random seed. | Integer or null |
webhook | A URL to receive a POST API call once the image generation is complete. | URL |
track_id | An ID returned in the API response, used to identify the webhook request. | Integer value |
Example
Body
{
"key":"{{API_KEY}}",
"init_image":"https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/149dd2e7-a8d7-4216-a074-4273082ff800/768",
"prompt": "Luxury bedroom with an elegant wooden floor, a stylish table, and a plush beige color carpet and wall, creating a warm and sophisticated ambiance.",
"negative_prompt": "blurry, low resolution, bad lighting, poorly drawn furniture, distorted proportions, messy room, unrealistic colors, extra limbs, missing furniture, bad anatomy, low detail, pixelated, grainy, artifacts, oversaturated, asymmetry, ugly, cartoonish, out of frame, duplicate objects",
"seed": 0,
"guidance_scale": 8,
"strength": 0.99,
"num_inference_steps": 51,
"base64": false,
"temp": false,
"scale_down": 6,
"webhook":null,
"track_id":null
}
Request
- JS
- PHP
- NODE
- PYTHON
- JAVA
var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"key":"",
"init_image": "https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/149dd2e7-a8d7-4216-a074-4273082ff800/768",
"prompt": "Luxury bedroom with an elegant wooden floor, a stylish table, and a plush beige color carpet and wall, creating a warm and sophisticated ambiance.",
"negative_prompt": "blurry, low resolution, bad lighting, poorly drawn furniture, distorted proportions, messy room, unrealistic colors, extra limbs, missing furniture, bad anatomy, low detail, pixelated, grainy, artifacts, oversaturated, asymmetry, ugly, cartoonish, out of frame, duplicate objects",
"seed": null,
"guidance_scale": 8,
"strength": 0.99,
"num_inference_steps": 51,
"base64": false,
"temp": false,
"webhook":null,
"track_id":null
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://modelslab.com/api/v6/interior/make", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));
<?php
$payload = [
"key": "",
"init_image" => "https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/149dd2e7-a8d7-4216-a074-4273082ff800/768",
"prompt" => "Luxury bedroom with an elegant wooden floor, a stylish table, and a plush beige color carpet and wall, creating a warm and sophisticated ambiance.",
"negative_prompt" => "blurry, low resolution, bad lighting, poorly drawn furniture, distorted proportions, messy room, unrealistic colors, extra limbs, missing furniture, bad anatomy, low detail, pixelated, grainy, artifacts, oversaturated, asymmetry, ugly, cartoonish, out of frame, duplicate objects",
"seed" => null,
"guidance_scale" => 8,
"strength" => 0.99,
"num_inference_steps" => 51,
"base64" => false,
"temp" => false,
"webhook" => null,
"track_id" => null
];
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://modelslab.com/api/v6/interior/make',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://modelslab.com/api/v6/interior/make',
'headers': {
'Content-Type': 'application/json'
},
body: JSON.stringify({
"key":"",
"init_image": "https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/149dd2e7-a8d7-4216-a074-4273082ff800/768",
"prompt": "Luxury bedroom with an elegant wooden floor, a stylish table, and a plush beige color carpet and wall, creating a warm and sophisticated ambiance.",
"negative_prompt": "blurry, low resolution, bad lighting, poorly drawn furniture, distorted proportions, messy room, unrealistic colors, extra limbs, missing furniture, bad anatomy, low detail, pixelated, grainy, artifacts, oversaturated, asymmetry, ugly, cartoonish, out of frame, duplicate objects",
"seed": null,
"guidance_scale": 8,
"strength": 0.99,
"num_inference_steps": 51,
"base64": false,
"temp": false,
"webhook":null,
"track_id":null
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
import requests
import json
url = "https://modelslab.com/api/v6/interior/make"
payload = json.dumps({
"key":"",
"init_image": "https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/149dd2e7-a8d7-4216-a074-4273082ff800/768",
"prompt": "Luxury bedroom with an elegant wooden floor, a stylish table, and a plush beige color carpet and wall, creating a warm and sophisticated ambiance.",
"negative_prompt": "blurry, low resolution, bad lighting, poorly drawn furniture, distorted proportions, messy room, unrealistic colors, extra limbs, missing furniture, bad anatomy, low detail, pixelated, grainy, artifacts, oversaturated, asymmetry, ugly, cartoonish, out of frame, duplicate objects",
"seed": null,
"guidance_scale": 8,
"strength": 0.99,
"num_inference_steps": 51,
"base64": false,
"temp": false,
"webhook": None,
"track_id":None
})
headers = {
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n \"key\":\"\",\n \"init_image\": \"https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/149dd2e7-a8d7-4216-a074-4273082ff800/768\",\n \"prompt\": \"Luxury bedroom with an elegant wooden floor, a stylish table, and a plush beige color carpet and wall, creating a warm and sophisticated ambiance.\",\n \"negative_prompt\": \"blurry, low resolution, bad lighting, poorly drawn furniture, distorted proportions, messy room, unrealistic colors, extra limbs, missing furniture, bad anatomy, low detail, pixelated, grainy, artifacts, oversaturated, asymmetry, ugly, cartoonish, out of frame, duplicate objects\",\n \"seed\": null,\n \"guidance_scale\": 8,\n \"strength\": 0.99,\n \"num_inference_steps\": 51,\n \"base64\": false,\n \"temp\": false,\n \"padding_right\": 10,\n \"padding_down\": 10\n}");
Request request = new Request.Builder()
.url("https://modelslab.com/api/v6/interior/make")
.method("POST", body)
.addHeader("Content-Type", "application/json")
.addHeader("X-API-Key", "{{token}}")
.build();
Response response = client.newCall(request).execute();
Response
- Success
- Processing
- Error
{
"status": "success",
"generationTime": 3.11,
"id": 128487787,
"output": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/livewire-tmp/vxg263sVkhyVOxGcKMQKTFJ8JsV4pq-metaNjczNTJjOTItNjRlNS00NDYzLWI3OTAtMGIzNjYzZGE1ODZkLTBbMV0ucG5n-.png"
],
"proxy_links": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/0e1ba8d1-1b91-475a-a2f5-e1ffe6d7022c.png"
],
"meta": {
"room_image": "https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/149dd2e7-a8d7-4216-a074-4273082ff800/768",
"prompt": "Luxury bedroom with an elegant wooden floor, a stylish table, and a plush red carpet, creating a warm and sophisticated ambiance.",
"seed": null,
"guidance_scale": 8,
"strength": 0.99,
"num_inference_steps": 51,
"base64": "no",
"temp": "no",
"negative_prompt": "blurry, low resolution, bad lighting, poorly drawn furniture, distorted proportions, messy room, unrealistic colors, extra limbs, missing furniture, bad anatomy, low detail, pixelated, grainy, artifacts, oversaturated, asymmetry, ugly, cartoonish, out of frame, duplicate objects",
"watermark": "no",
"scale_down": 6,
"opacity": 0.7,
"padding_right": 10,
"padding_down": 10,
"webhook": null,
"id": null,
"track_id": null,
"file_prefix": "0e1ba8d1-1b91-475a-a2f5-e1ffe6d7022c",
"outdir": "out"
}
}
{
"status": "processing",
"tip": "Your image is processing in background, you can get this image using fetch API",
"eta": 20,
"message": "Try to fetch request after seconds estimated",
"fetch_result": "https://modelslab.com/api/v6/interior/fetch/143820180",
"id": 143820180,
"output": [],
"meta": {
"room_image": "https://imagedelivery.net/PP4qZJxMlvGLHJQBm3ErNg/149dd2e7-a8d7-4216-a074-4273082ff800/768",
"prompt": "Luxury bedroom with an elegant wooden floor, a stylish table, and a plush beige color carpet and wall, creating a warm and sophisticated ambiance.",
"seed": 1571803262,
"guidance_scale": 8,
"strength": 0.99,
"num_inference_steps": 31,
"base64": "no",
"temp": "no",
"samples": 1,
"negative_prompt": "bad quality",
"watermark": "no",
"scale_down": 6,
"opacity": 0.7,
"padding_right": 10,
"padding_down": 10,
"webhook": null,
"id": 143820180,
"track_id": null,
"file_prefix": "67352c92-64e5-4463-b790-0b3663da586d",
"outdir": "out"
},
"future_links": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/livewire-tmp/vxg263sVkhyVOxGcKMQKTFJ8JsV4pq-metaNjczNTJjOTItNjRlNS00NDYzLWI3OTAtMGIzNjYzZGE1ODZkLTBbMV0ucG5n-.png"
]
}
{
"status": "error",
"message": "Error message"
}