Skip to main content
POST
/
interior
/
interior_mixer
Interior mixer
curl --request POST \
  --url https://modelslab.com/api/v6/interior/interior_mixer \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>",
  "init_image": "<string>",
  "object_image": "<string>",
  "prompt": "<string>",
  "width": 1280,
  "height": 1280,
  "guidance_scale": 123,
  "num_inference_steps": 8,
  "base64": false,
  "webhook": "<string>",
  "track_id": 123
}
'
import requests

url = "https://modelslab.com/api/v6/interior/interior_mixer"

payload = {
    "key": "<string>",
    "init_image": "<string>",
    "object_image": "<string>",
    "prompt": "<string>",
    "width": 1280,
    "height": 1280,
    "guidance_scale": 123,
    "num_inference_steps": 8,
    "base64": False,
    "webhook": "<string>",
    "track_id": 123
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({
    key: '<string>',
    init_image: '<string>',
    object_image: '<string>',
    prompt: '<string>',
    width: 1280,
    height: 1280,
    guidance_scale: 123,
    num_inference_steps: 8,
    base64: false,
    webhook: '<string>',
    track_id: 123
  })
};

fetch('https://modelslab.com/api/v6/interior/interior_mixer', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://modelslab.com/api/v6/interior/interior_mixer",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'key' => '<string>',
    'init_image' => '<string>',
    'object_image' => '<string>',
    'prompt' => '<string>',
    'width' => 1280,
    'height' => 1280,
    'guidance_scale' => 123,
    'num_inference_steps' => 8,
    'base64' => false,
    'webhook' => '<string>',
    'track_id' => 123
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://modelslab.com/api/v6/interior/interior_mixer"

	payload := strings.NewReader("{\n  \"key\": \"<string>\",\n  \"init_image\": \"<string>\",\n  \"object_image\": \"<string>\",\n  \"prompt\": \"<string>\",\n  \"width\": 1280,\n  \"height\": 1280,\n  \"guidance_scale\": 123,\n  \"num_inference_steps\": 8,\n  \"base64\": false,\n  \"webhook\": \"<string>\",\n  \"track_id\": 123\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://modelslab.com/api/v6/interior/interior_mixer")
  .header("Content-Type", "application/json")
  .body("{\n  \"key\": \"<string>\",\n  \"init_image\": \"<string>\",\n  \"object_image\": \"<string>\",\n  \"prompt\": \"<string>\",\n  \"width\": 1280,\n  \"height\": 1280,\n  \"guidance_scale\": 123,\n  \"num_inference_steps\": 8,\n  \"base64\": false,\n  \"webhook\": \"<string>\",\n  \"track_id\": 123\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://modelslab.com/api/v6/interior/interior_mixer")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n  \"key\": \"<string>\",\n  \"init_image\": \"<string>\",\n  \"object_image\": \"<string>\",\n  \"prompt\": \"<string>\",\n  \"width\": 1280,\n  \"height\": 1280,\n  \"guidance_scale\": 123,\n  \"num_inference_steps\": 8,\n  \"base64\": false,\n  \"webhook\": \"<string>\",\n  \"track_id\": 123\n}"

response = http.request(request)
puts response.read_body
{
  "status": "success",
  "generationTime": 123,
  "id": 123,
  "output": [
    "<string>"
  ],
  "proxy_links": [
    "<string>"
  ],
  "meta": {}
}
{
  "status": "error",
  "message": "<string>"
}

Request

Make a POST request to below endpoint and pass the required parameters in the request body.
curl
--request POST 'https://modelslab.com/api/v6/interior/interior_mixer' \

Body

json
{
    "key":"",
    "init_image": "https://assets.modelslab.ai/generations/6840b690-116b-438c-b59c-0e433f19252d.jpg",
    "object_image":"https://assets.modelslab.ai/generations/a9affef8-07ee-4ffe-aad5-195f18c17dc5.jpg",
    "prompt": "add sofa from image 1 to the good position room in image 2",
    "width": 1024,
    "height": 1024,
    "guidance_scale": 8,
    "num_inference_steps": 51,
    "base64": false,
    "webhook": null,
    "track_id": null
}

Body

application/json
key
string
required

Your API Key used for authenticating your request

init_image
string<uri>
required

Room image in which object wants to be added

object_image
string<uri>
required

Object which we want to add

prompt
string
required

Prompt required for generation

width
integer

Width of output image. Min: 512, Max: 2048. If not provided, uses original image resolution

Required range: 512 <= x <= 2048
height
integer

Height of the output image. Min: 512, Max: 2048. If not provided, uses original image resolution

Required range: 512 <= x <= 2048
guidance_scale
integer

The scale for classifier-free guidance

num_inference_steps
integer
default:8

Number of inference steps required for generation

base64
boolean
default:false

Specifies whether the response should be returned as a base64 string. Defaults to false

webhook
string<uri> | null

A URL to receive a POST API call once the image generation is complete

track_id
integer | null

An ID returned in the API response, used to identify the webhook request

Response

Interior mixer response

status
enum<string>
Available options:
success
generationTime
number

Time taken to generate the result in seconds

id
integer

Unique identifier for the generation request

output
string<uri>[]

Array of URLs to the generated images

Array of proxy URLs for the generated images

meta
object

Metadata about the generation process and parameters used