Virtual Staging API Documentation
Base URL:
https://api.ideal.house
Version: v1
Updated: 2026-04-13
π Overview
The Virtual Staging API allows you to redesign an empty or partially furnished room using AI.
You submit a room image URL and an optional text prompt, then retrieve the generated result asynchronously.
- Create a task β Submit
imageUrland optionalprompt, then receive ataskId. - Poll for results β Use
taskIdto query task status and get the output image.
π Authentication
All API requests must be authenticated using an API Key.
Include your API Key in the request header:
| Header | Value |
|---|---|
APIKEY | your_api_key_here |
β οΈ Keep your API Key secure. Do not expose it in client-side code or public repositories.
π° Credits Deduction
[!WARNING] πͺ 1 credit is deducted when a task is successfully created.
If the task ultimately fails, the deducted credit will be automatically refunded.
Insufficient credits will return error code9051. π See Credits Deduction Reference.
| Operation | Credits Deducted |
|---|---|
| Virtual Staging task | 1 credit |
π API Endpoints
1. Create Virtual Staging Task
Creates a new virtual staging task and returns a unique taskId for polling.
Endpoint
POST /api/v1/virtualStaging/generate
Request Headers
| Header | Required | Description |
|---|---|---|
APIKEY | β Yes | Your API authentication key |
Content-Type | β Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
imageUrl | string | β Yes | URL of the source room image |
prompt | string | β No | Optional prompt to guide style and furnishing |
indoorTypeId | string | β No | Optional room type preset. See Indoor Type Options |
indoorStyleId | string | β No | Optional interior style preset. See Indoor Style Options |
π Indoor Type Options
| Value |
|---|
Interior Design_Interior Scene_Living Room |
Interior Design_Interior Scene_Dining Room |
Interior Design_Interior Scene_Bed Room |
Interior Design_Interior Scene_Home Office |
π¨ Indoor Style Options
| Value |
|---|
Interior_Interior Style_Popular_Vs_Modern Minimal |
Interior_Interior Style_Popular_Vs_Modern Luxury |
Interior_Interior Style_Popular_Vs_Contemporary Warm |
Interior_Interior Style_Popular_Vs_Builder Grade-New Construction |
Interior_Interior Style_Popular_Vs_Luxury Airbnb-Short-Term Rental |
Interior_Interior Style_Popular_Vs_Scandinavian |
Interior_Interior Style_Popular_Vs_Traditional |
Interior_Interior Style_Popular_Vs_Industrial |
Interior_Interior Style_Popular_Vs_Modern Farmhouse |
π₯ Request Examples
cURL
curl -X POST "https://api.ideal.house/api/v1/virtualStaging/generate" \
-H "APIKEY: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/empty-living-room.jpg",
"prompt": "Warm and modern living room styling",
"indoorTypeId": "Interior Design_Interior Scene_Living Room",
"indoorStyleId": "Interior_Interior Style_Popular_Vs_Modern Farmhouse"
}'
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class VirtualStagingApiExample {
private static final String BASE_URL = "https://api.ideal.house";
private static final String API_KEY = "your_api_key_here";
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
String requestBody = """
{
"imageUrl": "https://example.com/empty-bedroom.jpg",
"prompt": "Cozy contemporary bedroom",
"indoorTypeId": "Interior Design_Interior Scene_Bed Room",
"indoorStyleId": "Interior_Interior Style_Popular_Vs_Contemporary Warm"
}
""";
Request request = new Request.Builder()
.url(BASE_URL + "/api/v1/virtualStaging/generate")
.addHeader("APIKEY", API_KEY)
.addHeader("Content-Type", "application/json")
.post(RequestBody.create(requestBody, MediaType.parse("application/json")))
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Response: " + response.body().string());
}
}
}
Python (requests)
import requests
BASE_URL = "https://api.ideal.house"
API_KEY = "your_api_key_here"
headers = {
"APIKEY": API_KEY,
"Content-Type": "application/json"
}
payload = {
"imageUrl": "https://example.com/empty-home-office.jpg",
"prompt": "Minimal modern home office",
"indoorTypeId": "Interior Design_Interior Scene_Home Office",
"indoorStyleId": "Interior_Interior Style_Popular_Vs_Modern Minimal"
}
response = requests.post(
f"{BASE_URL}/api/v1/virtualStaging/generate",
headers=headers,
json=payload
)
data = response.json()
task_id = data.get("data")
print(f"Task ID: {task_id}")
Node.js (axios)
const axios = require('axios');
const BASE_URL = 'https://api.ideal.house';
const API_KEY = 'your_api_key_here';
async function createVirtualStagingTask() {
try {
const response = await axios.post(
`${BASE_URL}/api/v1/virtualStaging/generate`,
{
imageUrl: 'https://example.com/empty-dining-room.jpg',
prompt: 'Modern luxury dining room',
indoorTypeId: 'Interior Design_Interior Scene_Dining Room',
indoorStyleId: 'Interior_Interior Style_Popular_Vs_Modern Luxury'
},
{
headers: {
'APIKEY': API_KEY,
'Content-Type': 'application/json'
}
}
);
const taskId = response.data.data;
console.log('Task ID:', taskId);
return taskId;
} catch (error) {
console.error('Error:', error.response?.data || error.message);
}
}
createVirtualStagingTask();
π€ Response
Success Response
{
"code": 0,
"message": "success",
"data": 1234567890123456789
}
| Field | Type | Description |
|---|---|---|
code | integer | 0 indicates success |
message | string | Response message |
data | long | The unique task ID for polling results |
2. Get Task Result
Retrieves the current status and output of a previously created virtual staging task.
Endpoint
GET /api/v1/virtualStaging/result
Request Headers
| Header | Required | Description |
|---|---|---|
APIKEY | β Yes | Your API authentication key |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
taskId | long | β Yes | The task ID returned from the create task endpoint |
π₯ Request Examples
cURL
curl -X GET "https://api.ideal.house/api/v1/virtualStaging/result?taskId=1234567890123456789" \
-H "APIKEY: your_api_key_here"
Java (OkHttp)
import okhttp3.*;
import java.io.IOException;
public class VirtualStagingResultExample {
private static final String BASE_URL = "https://api.ideal.house";
private static final String API_KEY = "your_api_key_here";
public static void main(String[] args) throws IOException {
OkHttpClient client = new OkHttpClient();
long taskId = 1234567890123456789L;
Request request = new Request.Builder()
.url(BASE_URL + "/api/v1/virtualStaging/result?taskId=" + taskId)
.addHeader("APIKEY", API_KEY)
.get()
.build();
try (Response response = client.newCall(request).execute()) {
System.out.println("Response: " + response.body().string());
}
}
}
Python (requests)
import requests
import time
BASE_URL = "https://api.ideal.house"
API_KEY = "your_api_key_here"
headers = {
"APIKEY": API_KEY
}
task_id = 1234567890123456789
while True:
response = requests.get(
f"{BASE_URL}/api/v1/virtualStaging/result",
headers=headers,
params={"taskId": task_id}
)
data = response.json()
result = data.get("data", {})
status = result.get("status")
print(f"Status: {status}, Progress: {result.get('percentage')}%, Queue: {result.get('waitNumber')}")
if status in ("Success", "Failed"):
break
time.sleep(3)
if status == "Success":
output = result["output"]
print("Result URL:", output["resultUrl"])
print("Size:", output["width"], "x", output["height"])
else:
print("Task ended with status:", status)
Node.js (axios)
const axios = require('axios');
const BASE_URL = 'https://api.ideal.house';
const API_KEY = 'your_api_key_here';
async function pollResult(taskId) {
const headers = { 'APIKEY': API_KEY };
while (true) {
const response = await axios.get(
`${BASE_URL}/api/v1/virtualStaging/result`,
{
headers,
params: { taskId }
}
);
const result = response.data.data;
const { status, percentage, waitNumber } = result;
console.log(`Status: ${status} | Progress: ${percentage}% | Queue: ${waitNumber}`);
if (['Success', 'Failed'].includes(status)) {
if (status === 'Success') {
console.log('Result URL:', result.output.resultUrl);
console.log('Size:', result.output.width, 'x', result.output.height);
} else {
console.log('Task ended with status:', status);
}
break;
}
await new Promise(resolve => setTimeout(resolve, 3000));
}
}
pollResult(1234567890123456789n);
π€ Response
Success Response (Task Completed)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Success",
"waitNumber": 0,
"percentage": 100,
"input": {
"imageUrl": "https://example.com/empty-room.jpg",
"prompt": "modern country living room with warm neutral materials",
"indoorTypeId": "Interior Design_Interior Scene_Living Room",
"indoorStyleId": "Interior_Interior Style_Popular_Vs_Modern Farmhouse"
},
"output": {
"resultUrl": "https://cdn.ideal.house/output/virtual_staging_result.jpg",
"width": 1024,
"height": 1024
}
}
}
Response (Task Processing / In Queue)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Processing",
"waitNumber": 1,
"percentage": 46,
"input": {
"imageUrl": "https://example.com/empty-room.jpg",
"prompt": "coastal bedroom with soft light and natural textures",
"indoorTypeId": "Interior Design_Interior Scene_Bed Room",
"indoorStyleId": "Interior_Interior Style_Popular_Vs_Contemporary Warm"
},
"output": null
}
}
Response (Task Failed)
{
"code": 0,
"message": "success",
"data": {
"id": 1234567890123456789,
"status": "Failed",
"waitNumber": 0,
"percentage": 100,
"input": {
"imageUrl": "https://example.com/empty-room.jpg",
"prompt": "..."
},
"output": null
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
id | long | Task unique identifier |
status | string | Current task status (see Task Status) |
waitNumber | integer | Number of tasks ahead in queue (0 means currently processing) |
percentage | integer | Task completion percentage (0-100) |
errorReason | string | Failure reason when status is Failed |
input | object | Original input parameters submitted for this task |
input.imageUrl | string | Source room image URL |
input.prompt | string | User prompt (if provided) |
input.indoorTypeId | string | Room type preset used (if provided) |
input.indoorStyleId | string | Interior style preset used (if provided) |
output | object | Generation result (available only when status is Success) |
output.resultUrl | string | URL of the generated virtual staging result image |
output.width | integer | Output image width in pixels |
output.height | integer | Output image height in pixels |
π Task Status
| Status | Meaning |
|---|---|
Unprocessed | Task is created and waiting in queue |
Processing | Task is currently running |
Success | Task completed successfully |
Failed | Task failed and no output was produced |
β Error Responses
All error responses share the same JSON structure:
{
"code": 5002,
"message": "Invalid API Key",
"data": null
}
Error Code Reference
| Code | Name | Description | Suggested Action |
|---|---|---|---|
1001 | FAILED | Request failed (generic error) | Check the message field for specific details |
1003 | INTERNAL_ERROR | Internal server error | Retry after a short delay; contact support if it persists |
1011 | PARAM_ERROR | Request parameter error (for example, missing imageUrl) | Ensure imageUrl is provided and is a valid URL |
5002 | API_KEY_INVALID | Invalid or missing API Key | Ensure the APIKEY header is present and correct |
9010 | SCAN_TEXT_ERROR | Prompt failed content moderation | Revise the prompt to remove sensitive or prohibited content |
9038 | PROHIBITED_CONTENT | Generated output image contains prohibited content | Adjust prompt/style/inputs and retry |
9051 | COINS_NOT_ENOUGH | Insufficient credits | Top up credits and retry |
π For full common error definitions, see Error Code Reference.
π Recommended Integration Flow
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β β
β Prepare: β
β - imageUrl (publicly accessible room image) [req] β
β - prompt (style guidance) [optional] β
β β
β 1. POST /api/v1/virtualStaging/generate β
β β Receive taskId (1 credit deducted) β
β β
β 2. Wait 3-5 seconds β
β β
β 3. GET /api/v1/virtualStaging/result?taskId={taskId} β
β β Check status β
β β
β status == "Unprocessed" or "Processing" β
β β Continue polling every 3-5 seconds β
β β
β status == "Success" β
β β Read output.resultUrl / width / height β
β β
β status == "Failed" β
β β Handle errorReason and error code β
β β Credits are refunded automatically β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β οΈ Notes
imageUrlmust be a publicly accessible URL.- For best results, upload clear room photos with minimal motion blur.
- Poll every 3-5 seconds to reduce unnecessary API traffic.
- If task status is
Failed, the deducted credit is automatically refunded.
Β© Ideal House AI β All rights reserved.