Virtual Staging

Stage empty spaces with virtual furniture and decor

Endpoint

HTTP Method
POST https://api.mnmlai.dev/v1/virtual-staging-ai

Request

Send a POST request with multipart/form-data containing your empty room image and staging specifications.

Required Parameters

ParameterTypeDescription
imageFileThe empty room image to stage (multipart/form-data)
promptStringDescription of desired furniture and staging

Optional Parameters

ParameterTypeDefaultDescription
room_typeString"living_room"Type of room being staged ("living room" | "bedroom" | "kitchen" | "office")
styleString"modern"Furniture and decor style ("modern" | "traditional" | "minimalist" | "luxury")
furniture_densityString"medium"Amount of furniture to add ("minimal" | "medium" | "full")
color_schemeString"neutral"Preferred color palette ("neutral" | "warm" | "cool" | "bold")

Response

The Virtual Staging AI endpoint processes your image asynchronously. You'll receive a response with a base64 encoded image.

Success Response (200 OK)

{
  "status": "success",
  "message": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...",
  "prompt": "Modern living room with sofa and coffee table"
}

Examples

Basic Example

curl -X POST https://api.mnmlai.dev/v1/virtual-staging-ai \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/empty_room.jpg" \
  -F "prompt=Modern living room with sofa and coffee table"

Advanced Example with All Parameters

curl -X POST https://api.mnmlai.dev/v1/virtual-staging-ai \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image=@/path/to/empty_room.jpg" \
  -F "prompt=Modern living room with sofa and coffee table" \
  -F "room_type=living room" \
  -F "style=modern" \
  -F "furniture_density=medium"

Node.js Example

const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');

const formData = new FormData();
formData.append('image', fs.createReadStream('/path/to/empty_room.jpg'));
formData.append('prompt', 'Modern living room with sofa and coffee table');
formData.append('room_type', 'living room');
formData.append('style', 'modern');
formData.append('furniture_density', 'medium');

const config = {
  method: 'post',
  url: 'https://api.mnmlai.dev/v1/virtual-staging-ai',
  headers: { 
    'Authorization': 'Bearer YOUR_API_KEY',
    ...formData.getHeaders()
  },
  data: formData
};

axios(config)
  .then(response => console.log(JSON.stringify(response.data)))
  .catch(error => console.log(error));

Python Example

import requests

url = "https://api.mnmlai.dev/v1/virtual-staging-ai"

payload = {
    'prompt': 'Modern living room with sofa and coffee table',
    'room_type': 'living room',
    'style': 'modern',
    'furniture_density': 'medium'
}

files = {
    'image': open('/path/to/empty_room.jpg', 'rb')
}

headers = {
    'Authorization': 'Bearer YOUR_API_KEY'
}

response = requests.post(url, headers=headers, data=payload, files=files)

print(response.json())

Best Practices

  • For best results, use high-quality, well-lit images of empty rooms with clear views of the space to be staged.

  • Detailed prompts yield better results. Be specific about the furniture style, arrangement, and mood you want to achieve.

  • Use the optional parameters like room_type, style, and furniture_density to guide the AI toward your desired staging outcome.

Error Handling

For detailed information on error responses, status codes, and best practices for handling errors, see our comprehensive API Errors documentation.

Virtual Staging Specific Errors

// 400 Bad Request - Missing required parameters
{
  "error": "Missing required field: image"
}

// 413 Payload Too Large - File size exceeded
{
  "error": "File size exceeds maximum limit of 10MB"
}

// 400 Bad Request - Invalid room type
{
  "error": "Unsupported room_type: 'garage'. Valid types are: living, bedroom, kitchen, bathroom, office"
}

Related Endpoints

Explore other AI-powered design tools: