decor8ai-sdk

Decor8 AI JavaScript SDK - AI Interior Design & Virtual Staging API

npm version License: MIT Node.js Version

The official JavaScript/Node.js SDK for Decor8 AI - a powerful AI interior design and AI virtual staging platform. Build AI room design applications, AI home decorations tools, and interior design by AI services with ease.

Features

Installation

npm install decor8ai

Requirements: Node.js >= 18.0.0

Configuration

Set your API key as an environment variable:

export DECOR8AI_API_KEY='your-api-key-here'

Get your API key at Decor8 AI Platform.

Quick Start

const Decor8AI = require('decor8ai');
const client = new Decor8AI();

// AI Virtual Staging
const result = await client.generateDesignsForRoom({
    inputImageUrl: 'https://example.com/empty-room.jpg',
    roomType: 'LIVINGROOM',
    designStyle: 'MODERN',
    numImages: 2
});

console.log(result.info.images);

Table of Contents


AI Virtual Staging

Transform empty rooms into beautifully furnished spaces using AI virtual staging technology.

Using Room Type and Design Style

const Decor8AI = require('decor8ai');
const client = new Decor8AI();

const result = await client.generateDesignsForRoom({
    inputImageUrl: 'https://example.com/empty-room.jpg',
    roomType: 'BEDROOM',
    designStyle: 'FRENCHCOUNTRY',
    numImages: 2,
    colorScheme: 'COLOR_SCHEME_5',
    specialityDecor: 'SPECIALITY_DECOR_2'  // Christmas decor
});

Using Custom Prompt for AI Room Design

const result = await client.generateDesignsForRoom({
    inputImageUrl: 'https://example.com/room.jpg',
    prompt: 'Modern minimalist room with sleek wardrobe, CONTEMPORARY table lamps, and floating dresser',
    numImages: 2,
    guidanceScale: 15.0,
    numInferenceSteps: 50
});

With Style Reference Image

const result = await client.generateDesignsForRoom({
    inputImageUrl: 'https://example.com/room.jpg',
    roomType: 'LIVINGROOM',
    designStyle: 'MODERN',
    designStyleImageUrl: 'https://example.com/style-reference.jpg',
    designStyleImageStrength: 0.8,
    numImages: 1
});

AI Interior Design (Inspirational)

Generate AI interior design concepts without an input image.

// Using room type and style
const result = await client.generateInspirationalDesigns({
    roomType: 'BEDROOM',
    designStyle: 'SCANDINAVIAN',
    numImages: 2
});

// Using custom prompt for AI room design
const result = await client.generateInspirationalDesigns({
    prompt: 'Luxurious master BEDROOM with ocean view and MODERN furniture',
    numImages: 2,
    guidanceScale: 15.0,
    seed: 42  // For reproducible results
});

AI Wall Color Change

Virtually repaint walls with AI home decorations technology.

const result = await client.changeWallColor(
    'https://example.com/room.jpg',
    '#4A90D9'  // Hex color code for the new wall color
);

AI Cabinet Color Change

Preview new cabinet finishes with AI kitchen design capabilities.

const result = await client.changeKitchenCabinetsColor(
    'https://example.com/kitchen.jpg',
    '#2C3E50'  // Hex color code for the new cabinet color
);

AI Kitchen Remodeling

Visualize kitchen renovations using AI interior design technology.

const result = await client.remodelKitchen(
    'https://example.com/kitchen.jpg',
    'MODERN',
    {
        numImages: 2,
        scaleFactor: 2
    }
);

AI Bathroom Remodeling

Preview bathroom transformations with AI home design visualization.

const result = await client.remodelBathroom(
    'https://example.com/bathroom.jpg',
    'CONTEMPORARY',
    {
        numImages: 2,
        scaleFactor: 2
    }
);

AI Landscaping

Generate AI landscaping designs for outdoor spaces (Beta).

const result = await client.generateLandscapingDesigns(
    'https://example.com/yard.jpg',
    'FRONT_YARD',       // 'FRONT_YARD', 'BACKYARD', or 'SIDE_YARD'
    'JAPANESE_ZEN',     // Garden style
    { numImages: 2 }
);

Garden Styles

Style Description
JAPANESE_ZEN Tranquil Japanese garden design
ENGLISH_COTTAGE Classic English garden aesthetic
MEDITERRANEAN Mediterranean-inspired landscaping
MODERN_MINIMALIST Clean, contemporary outdoor design
TROPICAL Lush tropical garden style

AI Sky Replacement

Enhance exterior property photos with beautiful skies.

const result = await client.replaceSkyBehindHouse(
    'https://example.com/house-exterior.jpg',
    'DUSK'  // 'DAY', 'DUSK', or 'NIGHT'
);

Sketch to 3D Render

Convert hand-drawn sketches into photorealistic AI room design renders.

const result = await client.sketchTo3dRender(
    'https://example.com/floor-plan-sketch.jpg',
    'MODERN',
    {
        numImages: 2,
        scaleFactor: 2,
        renderType: 'PERSPECTIVE'  // 'PERSPECTIVE' or 'isometric'
    }
);

Object Removal

Remove unwanted items from photos using AI interior design technology.

// Auto-detect and remove objects
const result = await client.removeObjectsFromRoom(
    'https://example.com/cluttered-room.jpg'
);

// With custom mask for specific areas
const result = await client.removeObjectsFromRoom(
    'https://example.com/room.jpg',
    'https://example.com/mask.jpg'  // Black/white mask
);

Image Upscaling

Enhance image resolution for professional AI home decorations output.

// From URL
const result = await client.upscaleImage(
    'https://example.com/room.jpg',
    4  // Scale factor (1-8)
);

// From local file
const result = await client.upscaleImage(
    '/path/to/local/image.jpg',
    2
);

Wall Priming

Prepare walls for AI virtual staging by applying uniform wall texture.

const result = await client.primeWallsForRoom(
    'https://example.com/room-with-damaged-walls.jpg'
);

Response Handling

All methods return a Promise with this structure:

{
    "error": "",
    "message": "Successfully generated designs.",
    "info": {
        "images": [
            {
                "uuid": "81133196-4477-4cdd-834a-89f5482bb9d0",
                "url": "https://generated-image-url.jpg",
                "width": 768,
                "height": 512,
                "captions": ["Modern minimalist BEDROOM..."]
            }
        ]
    }
}

Saving Generated Images

const fs = require('fs');
const https = require('https');
const path = require('path');

function downloadImage(url, outputPath) {
    return new Promise((resolve, reject) => {
        https.get(url, (response) => {
            if (response.statusCode === 200) {
                const fileStream = fs.createWriteStream(outputPath);
                response.pipe(fileStream);
                fileStream.on('finish', () => {
                    fileStream.close();
                    resolve();
                });
            } else {
                reject(new Error(`Download failed: ${response.statusCode}`));
            }
        });
    });
}

// Usage
const result = await client.generateDesignsForRoom({...});
for (const image of result.info.images) {
    await downloadImage(image.url, `./output/${image.uuid}.jpg`);
}

Design Styles Reference

50+ AI interior design styles available:

Styles      
MINIMALIST SCANDINAVIAN INDUSTRIAL BOHO
TRADITIONAL ARTDECO MIDCENTURYMODERN COASTAL
TROPICAL ECLECTIC CONTEMPORARY FRENCHCOUNTRY
RUSTIC SHABBYCHIC VINTAGE COUNTRY
MODERN ASIAN_ZEN HOLLYWOODREGENCY BAUHAUS
MEDITERRANEAN FARMHOUSE VICTORIAN GOTHIC
MOROCCAN SOUTHWESTERN TRANSITIONAL MAXIMALIST
ARABIC JAPANDI RETROFUTURISM ARTNOUVEAU
URBANMODERN WABI_SABI GRANDMILLENNIAL COASTALGRANDMOTHER
NEWTRADITIONAL COTTAGECORE LUXEMODERN HIGH_TECH
ORGANICMODERN TUSCAN CABIN DESERTMODERN
GLOBAL INDUSTRIALCHIC MODERNFARMHOUSE EUROPEANCLASSIC
NEOTRADITIONAL WARMMINIMALIST    

Room Types Reference

25+ room types for AI room design:

Room Types      
LIVINGROOM KITCHEN DININGROOM BEDROOM
BATHROOM KIDSROOM FAMILYROOM READINGNOOK
SUNROOM WALKINCLOSET MUDROOM TOYROOM
OFFICE FOYER POWDERROOM LAUNDRYROOM
GYM BASEMENT GARAGE BALCONY
CAFE HOMEBAR STUDY_ROOM FRONT_PORCH
BACK_PORCH BACK_PATIO    


Keywords: AI Interior Design, AI Virtual Staging, AI Virtual Staging API, AI decorations, AI Home Decorations, AI room design, Interior design by AI, AI home design, virtual staging software, real estate virtual staging