npm package: @decolens/decolens-sdk
Description: DecoLens Client SDK
Author: John Choi
Latest version: 1.0.4

# DecoLens SDK: AI-Powered Art Discovery

Welcome to the DecoLens SDK!

DecoLens is a SaaS platform dedicated to making art more accessible and enjoyable. We empower online art galleries to seamlessly integrate AI-driven art discovery flows into their websites, transforming the way customers find and connect with art, boosting user confidence and ultimately conversion rates.

**Experience the future of art discovery!** See the DecoLens SDK in action at our live demo: [demo.decolens.com](https://demo.decolens.com)

## Key Features

*   **AI-Driven Recommendations:**  Our core strength. DecoLens's AI analyzes the purpose, aesthetics, lighting, colors etc of the user's space to deliver highly relevant art recommendations, increasing the likelihood of a sale. 
*   **Natural Language Search:**  Have the user describe the artworks they are looking for using natural language without relying on detailed title and description metadata.
*   **"You Might Also Like":**  Enhance product pages with AI-powered "You Might Also Like" recommendations of visually similar artworks, encouraging further exploration.
*   **Seamless Integration:**  Our SDK is designed for straightforward integration into any online art gallery's website. With clear documentation and examples, you'll be up and running in no time.


## Getting Started

0.  **Sign Up for DecoLens:**
Go to [decolens.com](https://decolens.com) to sign up for a free account and create a new client API key. 

1.  **Installation:** 
`npm install @decolens/decolens-sdk`

2.  **Start Building!:** 
    ```javascript
    import { DecoLensClient, AnalysisResponse, Preferences, Style } from '@decolens/decolens-sdk';


    const decolens = new DecoLensClient({
      apiKey: 'YOUR_API_KEY', // Replace with your actual API key
    });

    const abortController = await decolens.analyzeRoom(
      'http://example.com/artworks/1234/image.jpg',
      {
        styles: [ Style.Minimalistic, Style.Abstract ],
        priceRange: [100, 1000],
        tags: ["us", "uk"]
      }, 
      {
        onPartial: (response) => {
          // Display partial result
          setAnalysisResponse(response);
        },
        onComplete: async (response) => {
          // Display the complete result
          setAnalysisResponse(response);
        },
        onError: (error) => {
          console.error('Analysis error:', error);
          // Handle error
        }
      }
    );

    ...

    const { artworkIds } = 
      await decolens.search("a beautiful sunset over the mountains" /* natural language query */, ["us", "abstract"]);

    ...

    const { artworkIds } = 
      await decolens.similarArtworks("123-456-789-abc" /* artworkId */);

    ```


## Learn More

*   **DecoLens Website:** [decolens.com](https://decolens.com) - Discover the full range of DecoLens's capabilities and access the admin console.
*   **Live Demo:** demo.decolens.com - See the DecoLens SDK in action and get inspired!
*   **Demo Website's Source Code:** [GitHub Repo](https://github.com/decolens25/decolens-saas-demo)
*   **Support:** [support@decolens.com](mailto:support@decolens.com)

## License

Apache 2.0

**We're excited to help you transform your online art gallery with the power of AI!**