top of page

A Complete Guide to the AI Virtual Staging API

  • Feb 22
  • 15 min read

An AI virtual staging API is just a technical way of saying you can programmatically add furniture and decor to empty room photos. It's the engine that lets your application automatically stage property images on a massive scale, without a single interior designer lifting a finger. This kind of tech is quickly becoming a must-have for any serious real estate platform.


The Definitive Guide to API Integration


Welcome to the complete reference guide for our AI Virtual Staging API. This guide is built for developers, product managers, and anyone looking to integrate powerful, automated property visualization into their platform. If you're building a real estate portal, a toolkit for photographers, or a marketing app for home builders, you’ll find all the technical details right here.


Before and after: an empty room digitally furnished with AI virtual staging via an API.


This API gives you a direct line to our core AI engine. It's not just about adding a couch to a photo; you can tap into sophisticated AI Home Design features. Think bigger—virtual renovations, removing old furniture, or even generating entire listing descriptions, all through simple API calls.


What This API Solves


Let's be honest, the modern property search starts online, and that first visual impression is everything. Our API tackles the big visual marketing headaches that used to be slow and expensive.


  • Slash Costs: It completely removes the need for physical staging. We're talking about a process that's often over 90% pricier than doing it digitally.

  • Get to Market Faster: Turn around property photos in minutes, not days. This means new listings can go live almost immediately.

  • Handle Huge Volume: Your platform can process thousands of images automatically. Good luck doing that with a team of manual designers.


The results speak for themselves. Properties that are virtually staged sell 75% faster than those left empty and pull in significantly more views online. When you integrate this API, you're giving your users a tool that helps them sell quicker and for a better price. You can see more about how our AI Virtual Staging works on our main page.


Core API Capabilities At a Glance


To get you started, here’s a quick rundown of what you can actually do with the API. Think of each feature as a building block for creating a fantastic user experience.


The table below summarizes the key functions available through the API.


Feature

Description

Primary Use Case

Image Upload

Securely upload property photos for the AI engine to process.

The starting point for any staging or renovation task.

AI Staging Request

Send an uploaded image for virtual staging with a specific style, like Modern or Farmhouse.

Furnishing empty homes or commercial spaces to help buyers visualize the potential.

Object Removal

Programmatically detect and erase existing furniture or clutter from a photo.

Clearing out an occupied room to create a blank canvas for virtual staging.

Virtual Renovation

Change permanent fixtures like floors, wall colors, or kitchen cabinets.

Showing off a property's potential by visualizing upgrades and remodels.

Result Retrieval

Pull the final, high-resolution staged or renovated images once processing is done.

Displaying the finished visuals in your app or marketing materials.


Each of these capabilities is designed to give you precise control over the final output. For a wider view on how this technology is impacting the industry, this practical guide to AI in architecture is a great read.


API Authentication and Secure Access


Getting started with our AI virtual staging API is all about authentication. To make any request, you'll need to include your unique API key. This key is how we know it's you, and it's the first step to keeping your integration secure.


Your API Keys


You’ll find your API keys in the developer dashboard right after you sign up. We issue two different keys, and it's crucial to understand the role of each:


  • Public Key: Think of this as your public identifier. It’s perfectly safe to use this key in client-side code, like in a web browser or a mobile app.

  • Secret Key: This one is like a password. You must keep it confidential at all times. Never, ever expose your secret key in frontend code where someone could find it.


Letting your secret key leak is a major security risk. It could give anyone unauthorized access to your account and allow them to make requests on your behalf.


Securing Your Credentials


So, how do you protect your secret key? The standard and most secure way is to store it as an environment variable on your server. This practice keeps the key out of your codebase (and out of your version control history), adding a simple but effective layer of security.


When you're ready to make a request from your backend, you'll pass the key in the header using the "Bearer" token format.


Key Takeaway: Treat your public and secret keys differently. The public key is for client-side use. The secret key is strictly for server-to-server calls and should be guarded carefully, ideally as an environment variable.

Getting this right from the beginning ensures everything runs smoothly and securely. For a deeper dive into the technical details, including code examples on how to structure your API calls for any AI Room Design task, you can learn more about our API authentication process in the full documentation.


Understanding Core API Endpoints


Once you're authenticated, you can get to the good stuff: the core endpoints of the AI virtual staging API. These are the workhorses that let your application upload photos, tell our AI what to do with them, and get back the beautifully staged results. Each one plays a specific role in the staging workflow.


Think of the process like a workshop. First, you bring in your raw materials (uploading an image). Then, you create a work order (initiating a staging job). Finally, you check on the job's progress and pick up the finished product. Getting comfortable with these endpoints is the key to a smooth and powerful integration.


The Image Upload Endpoint


Everything starts with your source image. The first step is always to upload the property photo you want staged. This endpoint is designed purely to accept your image and get it ready for the AI to process. It’s the foundational step—without an uploaded image, no AI Virtual Staging can happen.


You'll make a request to this endpoint, sending the image data as . When the upload is successful, the API sends back a unique . This ID is incredibly important, as you'll use it in all future API calls to tell our system which specific photo you want to work on.


Key Takeaway: Always save the you get back from this endpoint. It's the direct pointer to your photo on our servers and is absolutely required to start any staging job. If you lose it, you'll have to upload the image all over again.

The simple, three-step authentication process, which you'll complete before interacting with any endpoint, is shown below.


A three-step API authentication process flow diagram, showing getting a key, adding a header, and securing access.


This just gives you a quick visual of the flow: get your key, pop it in the request header, and you've got secure access to endpoints like the ones we're covering here.


Initiating a Staging Job


With your ready, you can now hit the staging endpoint to kick off a new job. This is where the magic really happens. In this request, you’ll specify which image to stage and define all the design parameters.


This is another request, but this time the body will be a JSON object with a few key-value pairs:


  • (required): The unique ID you got from the upload endpoint.

  • (required): The design aesthetic you're going for. We have options like "Modern," "Scandinavian," "Farmhouse," and more.

  • (required): Tell the AI what kind of room it is, like a "Living Room" or "Bedroom," so it can pick the right kind of furniture.

  • (optional): A URL where we can send you a notification as soon as the job is done. We highly recommend using this for asynchronous workflows.


A successful request here returns a . This new ID is your reference for this specific staging task. You'll need it to check the status and grab the final image. You can explore the full list of available styles and room types in our detailed endpoint documentation.


Checking Job Status and Retrieving Results


Because AI Interior Design involves some heavy lifting, it’s not instantaneous. The API is built to work asynchronously, which just means you submit a job and then check back on it a little later.


Using the from the last step, you can make a request to the status endpoint. The API will respond with the job's current state, which will be one of , , , or .


Once the status switches to , the JSON response will include a . This is a direct, secure link to your final, high-resolution staged image. From there, you can download the image and display it in your app, closing the loop on the entire API workflow.


Going Beyond Staging: Advanced AI Home Design


Staging an empty room is just the beginning. The real power of our AI virtual staging API kicks in when you explore its AI Home Design features. We're talking about full-on virtual renovations and smart content creation—the kind of tools that set your platform apart. These specialized endpoints give your users a complete toolkit for visualizing a home's true potential.


The market for these tools is growing fast. What was a USD 0.57 billion industry in 2026 is expected to become a USD 4.73 billion market by 2035. This isn't just a trend; it's a fundamental shift in how properties are marketed. Agents in the US, UAE, and Europe are already seeing 1-10% higher sale prices by using these tools to show what's possible, all without the cost and hassle of physical work.


A side-by-side image showing a pencil sketch transforming into a modern, colorful living room design with AI tools and paint swatches.


Object Removal and Virtual Renovations


One of the most useful features is object removal. This endpoint lets you programmatically "declutter" a room by wiping out existing furniture, stray boxes, or personal items from a photo. It’s perfect for creating a clean slate from an occupied or messy space, prepping it for a fresh virtual staging job. Think of it as an essential first step for sellers who can't physically move everything out.


Virtual renovation endpoints take this a giant leap forward. These tools allow you to make programmatic changes to a room's actual structure and finishes.


  • Flooring and Wall Changes: You can instantly swap old, worn-out carpets for sleek hardwood floors or apply a fresh coat of paint to the walls.

  • Color Matching: Get specific. You can even use exact paint color codes from major brands like Sherwin-Williams or Behr to show clients precisely how a new color would look in their space.

  • Fixture Updates: Help users visualize new kitchen cabinets, granite countertops, or modern lighting fixtures to highlight a property's hidden potential.


From Sketch to Photorealistic Render


The sketch-to-render endpoint is a real showstopper. This function can take a simple line drawing—even a basic architectural sketch—and turn it into a photorealistic 3D rendering. A user can upload a floor plan or a quick concept drawing, and the API generates a fully furnished, beautifully designed image.


This is a game-changer for new construction or major remodels where the final space doesn't even exist yet. It closes the gap between a blueprint and a buyer's imagination, helping them see the finished product in vivid detail. You can learn more about our full suite of AI design and renovation features and how to integrate them.


Automated Content Generation


Beyond the visuals, the API can also handle the writing. We have an endpoint that automatically generates compelling property listing descriptions based on the visual information in an image. The AI looks at the room’s style, key features, and selling points to write descriptive, engaging text.


This does more than just save agents a ton of time. It ensures every listing has a professional, keyword-rich description built to attract the right buyers. It’s a great example of AI tackling both the visual marketing and the administrative work that goes with it.


For a deeper look into the underlying technology, this article on generative AI for app development is a great resource. By combining these features, you can turn a simple API integration into a full-fledged design and marketing engine.


Implementing SDKs and Code Examples



To help you get your integration running as quickly as possible, we provide a full suite of Software Development Kits (SDKs). Think of these official libraries as helpful wrappers that handle all the boilerplate code—things like authentication, formatting requests, and parsing responses.


This means you can skip writing low-level HTTP logic and jump straight to building the core features of your application. Our SDKs are designed to feel natural and intuitive for developers working in their preferred language, saving you a ton of development time and helping you avoid common mistakes along the way.


Language and SDK Support Overview


To help you pick the right tool for the job, we've put together a quick reference table. It outlines our main SDKs and where they shine. Each one is a purpose-built layer on top of our REST API, designed to make a specific type of integration much simpler.


Language/Method

Primary Use Case

Key Benefit

Python

Ideal for backend services, data processing pipelines, and server-side applications.

Offers robust handling of asynchronous tasks, making it perfect for managing large volumes of AI Virtual Staging jobs.

JavaScript

The standard for web applications, perfect for building interactive frontend experiences.

Enables direct, client-side interaction with the API, allowing users to upload and stage photos within your web app.

Dart (Flutter)

Built for cross-platform mobile development on both iOS and Android.

Provides a single codebase for creating powerful mobile apps that leverage our AI Home Décor features on the go.

cURL/HTTP

A universal method for any language or environment not covered by an official SDK.

Offers maximum flexibility for custom integrations, scripting, or quick testing directly from the command line.


Each SDK is backed by its own documentation and practical, ready-to-use examples. These resources will guide you through everything, from making your first authenticated call to fetching the final, high-resolution staged image.


Python Example for Backend Processing


When it comes to backend workflows, Python is an fantastic choice thanks to its clarity and powerful libraries. The code snippet below shows a complete cycle: authenticating, uploading an image, starting a staging job, and then checking for the result. This is exactly the kind of script you’d run on a server to process new property photos automatically.


import decor8 import time


Authenticate with your API key


decor8.api_key = "YOUR_SECRET_API_KEY"


1. Upload the image from a local path


print("Uploading image...") with open("empty_living_room.jpg", "rb") as f: image = decor8.Image.upload(f) print(f"Image uploaded with ID: {image.id}")


2. Submit a staging job


print("Submitting staging job...") job = decor8.Staging.create( image_id=image.id, style="Modern", room_type="Living Room" ) print(f"Job submitted with ID: {job.id}")


3. Poll for the result


while job.status != "completed": print("Job status is not complete, checking again in 10 seconds...") time.sleep(10) job.refresh() # Update the job status


print("Job completed!") print(f"Result URL: {job.result_url}")


Just a quick note: this example uses a simple polling method to check the job status. For production-grade systems, we highly recommend using webhooks for a more efficient, event-driven approach.


JavaScript Example for Web Applications


If you're building a web interface, you'll want to use our JavaScript SDK to communicate with the API right from the browser. This example shows how to handle a user file upload and then kick off an AI Room Design job. Remember, since this code runs on the client side, it should use your public API key.


If you want to play around with request bodies and parameters yourself, check out our interactive API documentation and playground.


// Initialize with your public API key const decor8 = new Decor8('YOUR_PUBLIC_API_KEY');


// Assume 'fileInput' is an element const fileInput = document.getElementById('image-upload');


fileInput.addEventListener('change', async (event) => { const file = event.target.files[0]; if (!file) return;


try { // 1. Upload the image console.log('Uploading image...'); const image = await decor8.image.upload(file); console.log();


// 2. Submit the staging job
console.log('Submitting staging job...');
const job = await decor8.staging.create({
  image_id: image.id,
  style: 'Scandinavian',
  room_type: 'Bedroom',
});
console.log(`Job submitted with ID: ${job.id}`);

// You would then use the job.id to check for completion

} catch (error) { console.error('An error occurred:', error); } });


These examples should give you a solid jumping-off point for integrating our API. Using the official SDKs will not only speed up your development but also lead to a more stable and reliable final product.


Handling API Responses and Error Codes


A solid integration hinges on how your app communicates with the AI virtual staging API. Every request you send will get a standard HTTP status code and a JSON response back. Knowing how to handle these is key to building a reliable app that can deal with both successful requests and the occasional error.


When things go right, you'll see a or status code. The JSON that comes with it will have the data you need to move forward, like an after you upload a photo or a when you kick off a staging job.


Understanding Common API Error Codes


Things don't always go perfectly, and that's okay. Failures are a normal part of working with any API. Instead of letting them crash your application, they should be used to provide clear feedback. Our API uses standard HTTP status codes to signal what went wrong, and the JSON response will include a message to help you pinpoint the issue.


Quickly decoding these errors is especially helpful for any AI Interior Design task, as it gets you back on track faster. The table below breaks down the most common errors you'll run into.


Status Code

Error Code

Meaning and How to Fix It



The request is missing something important, like the or . Fix: Check the endpoint documentation again and make sure all required fields are in your request.



Your API key is either wrong, expired, or not included in the header. Fix: Make sure you’re using the right key and that it’s active in your developer dashboard.



You're asking for something that doesn't exist, like a specific or . Fix: Double-check the ID to make sure it's correct and hasn't been deleted.



You've hit your account's rate limit by sending too many requests in a short period. Fix: It's best to build in an exponential backoff to retry the request after a short wait. If this keeps happening, you might need to look into a plan upgrade.


Integration Best Practices for Developers


When you integrate an AI virtual staging API, you're doing more than just connecting endpoints. You're building a system that needs to be fast, reliable, and scalable to deliver a fantastic user experience. Getting the implementation right from the start will save you countless headaches down the road.


The key is to optimize every part of the process. This means thinking about how you handle image uploads, how you manage the asynchronous nature of AI rendering, and how you interact with the API itself. A smooth, efficient workflow is what separates a good integration from a great one.


Workflow diagram illustrating best practices for AI processing from upload to webhook, highlighting scalability.


Efficiently Handling API Workflows


The biggest performance win you can get is by embracing asynchronous processing. AI rendering isn't instant, and a synchronous "wait-for-it" approach will lock up your system and leave users staring at a loading screen. A much better way is to use webhooks to build an event-driven architecture.


Here's the workflow we strongly recommend:


  • Optimize Image Uploads: Always compress images on the client-side before uploading them. This simple step shrinks the file size, making uploads much faster and your interface feel more responsive.

  • Use Webhooks for Notifications: When you submit a staging job, be sure to include a . This tells our servers where to send a notification the second the job is done. No more constant polling to check the status.

  • Manage Rate Limits Gracefully: If you expect to send a lot of requests, build an exponential backoff strategy into your code. If you hit a rate limit, your system should automatically wait a bit, then a little longer, before trying again.


Designing a User-Centric Interface


A powerful backend is only part of the equation. Your user interface (UI) needs to be just as thoughtful, making it easy for people to access all the AI Home Design features you're offering.


Key Takeaway: A well-designed interface keeps users informed. Show loading indicators or progress bars to let them know their request is being processed. Once your webhook gets the notification that the image is ready, display it immediately. This creates a professional and seamless experience.

The market for integrations like this is growing quickly, with mobile-first platforms and subscription services leading the way in the US, Europe, and Asia-Pacific. We're already seeing smart developers build plugins for platforms like Wix and WordPress, tapping into a massive user base. As 92% of Fortune 500 companies adopt generative AI, the opportunity is huge. You can dig deeper into market trends with this comprehensive report on virtual staging software. By following these best practices, your integration will be well-positioned to succeed.


Frequently Asked Questions


Got questions? You're in the right place. Here are some quick answers to the most common things developers ask about our AI virtual staging API, from usage limits to billing.


What Are the API Rate Limits?


To keep the service fast and reliable for everyone, we have rate limits in place. These are measured in requests per minute (RPM), and the exact number depends on your subscription plan.


  • Free & Trial Tiers: These come with lower limits, perfect for initial testing and smaller projects.

  • Professional & Enterprise Tiers: We offer much higher rate limits on these plans to handle the demands of large-scale, production applications.


If you happen to go over your plan's limit, the API will respond with a error. The best way to handle this is to build an exponential backoff strategy right into your code so your application can retry gracefully.


What Image Formats and Resolutions Work Best?


The quality of your input image has a huge impact on the final AI Room Design result. For the sharpest, most realistic virtual staging, we suggest following these guidelines.


  • Formats: We accept all the usual suspects: JPEG, PNG, and HEIC. If you're looking for the fastest upload and processing times, JPEG is typically your best bet.

  • Resolution: Aim for a minimum resolution of 1920x1080 pixels (Full HD). Honestly, the higher, the better. Photos from modern DSLRs or high-end smartphones give our AI more detail to work with, which translates into a more stunning final image.

  • File Size: While our API can handle large files, it's a good idea to compress images on your end before uploading them. Keeping file sizes under 10MB makes everything run faster and more smoothly.


Stick to these recommendations, and you'll give the AI plenty of high-quality visual data to produce incredible results every time.


How Does Billing and Usage Tracking Work?


We keep billing simple and transparent. It’s a credit-based system, so you only pay for what you actually use.


Every API call, whether it's an AI Virtual Staging request or an object removal job, deducts a certain number of credits from your account. You can top up by buying credit packs or sign up for a monthly plan that includes a set amount of credits. Your developer dashboard gives you a real-time look at your credit balance and a detailed usage log, making it easy to track your spending and manage costs.



Ready to put your property marketing on autopilot? The Decor8 AI Virtual Staging API can transform thousands of images in the time it takes to grab a coffee. Dive into our documentation and find the right plan to get going. Start building with Decor8 AI.


 
 
 

Comments


bottom of page