Gepetto
Back to GepettoBlog
  • INTRODUCTION
    • Overview
    • Getting Started
    • Rate limiting
    • Pricing
    • Cold boots
    • Server Status
  • Endpoints
    • Redesign
    • Furnish
    • Smart Staging 🔮
    • Smart Staging v2 🔮
    • Sunshine ☀️
    • Declutter 🩹
    • Magic Enhancer ✨
    • Upscale
    • Get Styles
    • Get Skies
    • Get Rooms
    • Get Job
  • Webhooks
Powered by GitBook
On this page
  • Endpoint
  • Code Examples

Was this helpful?

  1. Endpoints

Furnish

Furnish will let you add furnitures to empty rooms.

⚠️ You can use it on already furnished rooms but you won't get the best results out of it.

🔥 Try to use the result of Furnish with Redesign, you will get a better photorealistic result.

Endpoint

POST https://europe-west1-gepettoai.cloudfunctions.net/v1/furnish

Headers

Name
Type
Description

Authorization*

String

Bearer {{API_KEY}}

Request Body

Name
Type
Description

url*

String (URL)

Image URL of the room to be redesigned.

mask

String (URL)

(Optional but recommended for more precision)

⚠️ The mask should have the same dimension as the base image url parameter. If set, preserveWindows is ignored

roomId*

String

styleId*

String

webhook

String (URL)

(optional) Webhook POST URL to send the result on completion. If not provided, the request will wait for the result.

preserveWindows

Boolean

Tells explicitly to not touch windows, doors, french doors and bay windows and thus not modify the view.

{
  "base64": "<base64 encoded image>",
  "status": "success"
}
{
  "status": "pending",
  "id": "xxxxxxxxxxxxxx", // You can use that id with Get Job
  "styleId": "your_style",
  "roomId": "your_room",
  "mode": "furnish"
}

Code Examples

curl --location 'https://europe-west1-gepettoai.cloudfunctions.net/v1/furnish' \
--header 'Authorization: Bearer {{API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
  "url": "https://thumbs.dreamstime.com/b/empty-room-26533582.jpg",
  "styleId": "demeures",
  "roomId": "living_room",
}'
var myHeaders = new Headers();
myHeaders.append("Authorization", "Bearer {{API_KEY}}");
myHeaders.append("Content-Type", "application/json");

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: JSON.stringify({
    "url": "https://thumbs.dreamstime.com/b/empty-room-26533582.jpg",
    "styleId": "demeures",
    "roomId": "living_room"
  })
};

const response = await fetch("https://europe-west1-gepettoai.cloudfunctions.net/v1/furnish", requestOptions)
const body = await reponse.json();
console.log(body)
import requests
import json

url = "https://europe-west1-gepettoai.cloudfunctions.net/v1/furnish"

payload = json.dumps({
  "url": "https://thumbs.dreamstime.com/b/empty-room-26533582.jpg",
  "styleId": "demeures",
  "roomId": "living_room"
})
headers = {
  'Authorization': 'Bearer {{API_KEY}}',
  'Content-Type': 'application/json'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
<?php
$client = new Client();
$headers = [
  'Authorization' => 'Bearer {{API_KEY}}',
  'Content-Type' => 'application/json'
];
$body = '{
  "url": "https://thumbs.dreamstime.com/b/empty-room-26533582.jpg",
  "styleId": "demeures",
  "roomId": "living_room"
}';
$request = new Request('POST', 'https://europe-west1-gepettoai.cloudfunctions.net/v1/furnish', $headers, $body);
$res = $client->sendAsync($request)->wait();
echo $res->getBody();
package main

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

func main() {

  url := "https://europe-west1-gepettoai.cloudfunctions.net/v1/furnish"
  method := "POST"

  payload := strings.NewReader(`{
    "url": "https://thumbs.dreamstime.com/b/empty-room-26533582.jpg",
    "styleId": "demeures",
    "roomId": "living_room"
}`)

  client := &http.Client {}
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Authorization", "Bearer {{API_KEY}}")
  req.Header.Add("Content-Type", "application/json")

  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := ioutil.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
require "uri"
require "json"
require "net/http"

url = URI("https://europe-west1-gepettoai.cloudfunctions.net/v1/furnish")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = "Bearer {{API_KEY}}"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
  "url": "https://thumbs.dreamstime.com/b/empty-room-26533582.jpg",
  "styleId": "demeures",
  "roomId": "living_room"
})

response = https.request(request)
puts response.read_body

Last updated 11 months ago

Was this helpful?

Ex:

Custom mask image URL of the area to furnish. Ex:

The room ID that can be fetched on the endpoint.

The style ID that can be fetched on the endpoint.

Base Image
Mask Image
Get Rooms
Get Styles