npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

decor8ai

v1.0.11

Published

Decor8 AI is an AI Interior Design Platform. With Decor8 AI Javascript SDK, you can automate various interior design generation tasks such as virtually staging an empty room or re-designing a room with its photo. You can also use Decor8 AI Javascript SDK

Readme

Decor8 AI JavaScript SDK

Table of Contents

Installation

npm install decor8ai

Configuration

Set your API key as an environment variable:

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

Usage Examples

Room Design Generation

Using Room Type and Style

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

decor8.generateDesignsForRoom(
    'https://example.com/room.jpg',
    'bedroom',
    'frenchcountry',
    null,
    null,
    1,
    'COLOR_SCHEME_0',
    'SPECIALITY_DECOR_0'
)
.then(response => console.log(response))
.catch(error => console.error(error));

Using Custom Prompt with Advanced Parameters

decor8.generateDesignsForRoom(
    'https://example.com/room.jpg',
    null,  // room_type not needed with custom prompt
    null,  // design_style not needed with custom prompt
    null,
    null,
    2,
    null,
    null,
    null,
    'Modern minimalist room with sleek wardrobe, contemporary Table Lamps, and floating Dresser',
    'high end, professional photo',
    'clean lines, ambient lighting',
    'cluttered, traditional, ornate',
    42,
    15.0,
    50
)
.then(response => console.log(response));

Using Simple Custom Prompt

decor8.generateDesignsForRoom(
    'https://example.com/room.jpg',
    null,  // room_type not needed
    null,  // design_style not needed
    null,
    null,
    1,
    null,
    null,
    null,
    'Room with wardrobe, Table Lamps, Dresser',
    null,
    null,
    null,
    null,
    15.0
)
.then(response => console.log(response));

Inspirational Designs

Using Room Type and Style

decor8.generateInspirationalDesigns(
    'bedroom',
    'modern',
    2
)
.then(response => console.log(response));

Using Custom Prompt

decor8.generateInspirationalDesigns(
    null,  // room_type not needed with custom prompt
    null,  // design_style not needed with custom prompt
    2,
    'Luxurious room with ocean view and modern furniture',
    'high end, professional photo',
    'natural lighting',
    'cluttered, dark',
    42,
    15.0,
    50
)
.then(response => console.log(response));

Wall Priming

decor8.primeWallsForRoom('https://example.com/room.jpg')
    .then(response => console.log(response));

Image Captions

decor8.generateImageCaptions('livingroom', 'modern', 2)
    .then(response => console.log(response));

Image Upscaling

decor8.upscaleImage('https://example.com/room.jpg', 2)
    .then(response => console.log(response));

Response Handling

Example response structure:

{
    "error": "",
    "message": "Successfully generated designs.",
    "info": {
        "images": [
            {
                "uuid": "81133196-4477-4cdd-834a-89f5482bb9d0",
                "url": "https://example.com/image.jpg",
                "width": 768,
                "height": 512,
                "captions": [
                    "Modern minimalist bedroom with sleek furniture and ambient lighting"
                ]
            }
        ]
    }
}

Saving Generated Images

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

function downloadAndSaveImage(url, outputDir, filename) {
    return new Promise((resolve, reject) => {
        https.get(url, (response) => {
            if (response.statusCode === 200) {
                const fileStream = fs.createWriteStream(path.join(outputDir, filename));
                response.pipe(fileStream);
                fileStream.on('finish', () => {
                    fileStream.close();
                    resolve();
                });
            } else {
                reject(new Error(`Failed to download image: ${response.statusCode}`));
            }
        });
    });
}

// Usage in response handling
response.info.images.forEach((design, index) => {
    const filename = `design_${design.uuid}.jpg`;
    downloadAndSaveImage(design.url, './output', filename);
});

Parameters Reference

Common Parameters

| Parameter | Type | Description | |-----------|------|-------------| | input_image_url | string | URL of the input image | | room_type | string | Type of room (e.g., 'bedroom', 'livingroom') | | design_style | string | Design style (e.g., 'modern', 'frenchcountry') | | num_images | number | Number of images to generate (default: 1) | | prompt | string | Custom prompt describing desired outcome | | prompt_prefix | string | Text to prepend to the prompt | | prompt_suffix | string | Text to append to the prompt | | negative_prompt | string | Things to avoid in generation | | seed | number | Random seed for reproducible results | | guidance_scale | number | Controls how closely to follow the prompt (default: 7.5) | | num_inference_steps | number | Number of denoising steps (default: 30) |

Additional Features

| Feature | Description | |---------|-------------| | color_scheme | Predefined color schemes (e.g., 'COLOR_SCHEME_0') | | speciality_decor | Special decorative themes (e.g., 'SPECIALITY_DECOR_0') | | scale_factor | Image scaling factor for output |

For complete API documentation, visit Decor8 AI API Documentation