Skip to main content

Create Room Interior Endpoint

Overview

V5 APIs Create Room Interior endpoint generates room interiror by modifing a picture of the room.

Together with the room image you can add your description of the desired result in a text prompt.

Interior endpoint result

Request

--request POST 'https://modelslab.com/api/v5/interior' \

Make a POST request to https://modelslab.com/api/v5/interior endpoint and pass the required parameters in the request body.

Body Attributes

ParameterDescriptionValues
keyYour API Key used for request authorization.string
promptA text description of the things you want in the generated image.string
init_imageLink to the initial image to be used as a reference.URL
num_inference_stepsNumber of denoising steps.21, 31, 41
base64Indicate if the image is a base64 encoded image."yes"/"no"
guidance_scaleScale for classifier-free guidance.Minimum: 1, Maximum: 20

Example

Body

Body
{
"key":"",
"init_image" : "https://huggingface.co/lllyasviel/sd-controlnet-mlsd/resolve/main/images/room.png",
"prompt" : "room",
"num_inference_steps" : 21,
"base64" : "no",
"guidance_scale" : 7
}

Request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
"key": "",
"init_image" : "https://huggingface.co/lllyasviel/sd-controlnet-mlsd/resolve/main/images/room.png",
"prompt" : "room",
"num_inference_steps" : 21,
"base64" : "no",
"guidance_scale" : 7
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://modelslab.com/api/v5/interior", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Response

Example Response
{
"status": "success",
"generationTime": 8.02,
"id": 99044687,
"output": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/0-a29592cc-2c98-46e1-ae7b-bb1d2550a578.png"
],
"meta": {
"prompt": " room",
"model_id": "realistic-vision-v13",
"controlnet_model": "mlsd",
"controlnet_type": "mlsd",
"negative_prompt": "",
"scheduler": "EulerAncestralDiscreteScheduler",
"safety_checker": "no",
"auto_hint": "yes",
"guess_mode": "no",
"strength": 1,
"W": 560,
"H": 752,
"guidance_scale": 7,
"controlnet_conditioning_scale": 1,
"seed": 1972171263,
"multi_lingual": "no",
"use_karras_sigmas": "no",
"algorithm_type": "no",
"safety_checker_type": "sensitive_content_text",
"instant_response": "no",
"tomesd": "no",
"init_image": "https://huggingface.co/lllyasviel/sd-controlnet-mlsd/resolve/main/images/room.png",
"mask_image": null,
"control_image": null,
"vae": null,
"steps": 21,
"full_url": "no",
"upscale": "no",
"n_samples": 1,
"embeddings": null,
"ip_adapter_id": null,
"ip_adapter_scale": 0.6,
"ip_adapter_image": null,
"enhance_prompt": "no",
"enhance_style": null,
"lora": null,
"lora_strength": 1,
"temp": "no",
"base64": "no",
"clip_skip": 1,
"file_prefix": "a29592cc-2c98-46e1-ae7b-bb1d2550a578.png"
},
"tip": "Get 20x faster image generation using enterprise plan. Click here : https://modelslab.com/enterprise"
}