Package: decor8ai
Decor8 AI Python SDKTable of ContentsOverviewInstallationConfigurationUsageDesign With PhotoDesign Without PhotoPriming the wallsUpscale the imageGenerate Captions for the imageDesign StylesRoom TypesDecor8 AI is a cutting-edge interior design app that revolutionizes your design experience. It offers a rich tapestry of customization options allowing you to visualize and craft interiors that echo your style and imagination.You can choose from 35+ interior design styles and 20+ room types to create unique interior design styles for your space.The app specializes in virtual staging, transforming empty spaces into vivid, attractive interiors, enhancing their appeal for better marketability.Equipped with a powerful Python SDK, Decor8 AI facilitates seamless integrations, enabling enhanced design generation capabilities directly within your Python environment. Its user-friendly interface is optimized for performance on smaller screens, ensuring that your design process is as effortless and efficient as possible.This documentation describes how you can use Decor8 AI Python SDK to integrate Decor8 AI's powerful features in your application.Please reach out toDecor8 AI Teamwith questions or suggestions.InstallationYou can install the Decor8 AI Python SDK using pip:pipinstalldecor8aiConfigure Decor8 AI API keySign in toDecor8 AIClick on Profile Photo on Top LeftClick Generate API KeyUsageexportDECOR8AI_API_KEY='<YOUR_API_KEY>'Generating Interior Design with a Photo of the roomfromdecor8ai.clientimportgenerate_designs# Mandatory Parametersinput_image='path/to/your/image.png'#local-file-path or URL or bytesroom_type='livingroom'# See below for all supported room typesdesign_style='frenchcountry'# See below for all supported design Stylesnum_images=1# Up to 4 images can be generated at a time# Optional Parametersnum_captions=None# Choose 1 or 2 for number of image captions to generatekeep_original_dimensions=False# True or False. Generated designs retain original image's dimensions (and aspect ratio)response_json=generate_designs(input_image=input_image,room_type=room_type,design_style=design_style,num_images=num_images,num_captions=1,keep_original_dimensions=True)The response is a JSON object containing the generated designs and other information.

Sample response for successful design generation

{
    "error": "",
    "message": "Successfully generated designs.",
    "info":
    {
        "images":
        [
            {
                "uuid": "81133196-4477-4cdd-834a-89f5482bb9d0",
                "data": "<base64-encoded_data>",
                "width": 768,
                "height": 512,
                "captions":
                [
                    "Unveiling the art of rustic elegance in this French Country haven, where warmth and sophistication meet effortlessly."
                ]
            }
        ]
    }
}

Sample response when unsuccessful. "error" will be non-empty value.
{
    "error": "InvalidInput",
    "message": "Invalid input image. Please check the input image and try again.",
}Generating Inspirational Interior Design Ideas without using a photo of the roomfromdecor8ai.clientimportgenerate_designs# Here, we don't provide input image. The API generates a new interior design using following parameters.room_type='livingroom'# See below for all supported room typesdesign_style='frenchcountry'# See below for all supported design Stylesnum_images=1# Up to 4 images can be generated at a time# Optional Parametersnum_captions=None# Choose 1 or 2 for number of image captions to generateresponse_json=generate_designs(room_type=room_type,design_style=design_style,num_images=num_images,num_captions=1)Priming the wallsIf your room contains unfinished walls, unpainted walls or walls which need touch-up, use this API to get walls with basic white colored, smooth textured walls or as it's called 'primed walls'.You can use the returned image as input to generate_designs API for filling it with furniture.fromdecor8ai.clientimportprime_the_room_wallsinput_image='path/to/your/image.png'#local-file-path or URL or bytesresponse_json=prime_the_room_walls(input_image=input_image)Upscale the imageAI generated designs may have a smaller resolution for some use-cases. Use this API to get upto 4x the original resolution of the image. Original images of upto maximum 1024px width or height or both are supported.fromdecor8ai.clientimportupscale_imageinput_image='path/to/your/image.png'#local-file-path or URL or bytesscale_factor=2response=upscale_image(input_image,scale_factor)Generate captions for the interior imageIf you need apt captions for an image depicting a specific interior design style in a room, use this API.fromdecor8ai.clientimportgenerate_image_captionsroom_type='livingroom'design_style='frenchcountry'num_captions=2response=generate_image_captions(room_type,design_style,num_captions)Sample output

{
    "error": "",
    "message": "Successfully generated image captions.",
    "info":
    {
        "captions":
        [
            "\"Enchanting French Country Charm: Where cozy meets elegance in the heart of the living room.\"",
            "\"Step into a Parisian dream - where charm, elegance, and comfort seamlessly blend in this enchanting French country living room retreat. Get ready to indulge in rustic sophistication and let the cozy embrace of timeless design whisk you away to provincial bliss.\""
        ]
    }
}Supported Design StylesDecor8 AI supports following design styles. Learn more about these styles atDecor8 AI Decoration StylesDesign Stylesminimalistscandinavianindustrialbohotraditionalartdecomidcenturymoderncoastaltropicaleclecticcontemporaryfrenchcountryrusticshabbychicvintagecountrymodernasian_zenhollywoodregencybauhausmediterraneanfarmhousevictoriangothicmoroccansouthwesterntransitionalmaximalistarabicjapandiretrofuturismartnouveauSupported Room TypesDecor8 AI supports following room types. Learn more about these room types atDecor8 AI Room TypesRoom Typelivingroomkitchendiningroombedroombathroomkidsroomfamilyroomreadingnooksunroomwalkinclosetmudroomtoyroomofficefoyerpowderroomlaundryroomgymbasementgaragebalconycafehomebarstudy_roomfront_porchback_porchback_patio