Overview
The AI Chat SDK (@sleek/ai-chat-sdk) enables web applications to integrate intelligent, context-aware AI chat capabilities. The SDK provides a beautiful chat interface featuring AI-powered recommendations and merchant offers, helping users discover products while providing monetization opportunities through offer redirect URLs and cashback integrations.
Key capabilities
- Chat interface: Full-featured 400px sidebar with AI conversation interface
- Event system: Comprehensive events for all user interactions
- Data integration: Display offer redirect URLs and cashback offers in conversations
- Full customization: Brand colors, logos, and UI styling
- Multiple integration methods: NPM package or IIFE script injection
- Shadow DOM isolation: Prevents styling conflicts with your application
Prerequisites
Before integrating the SDK, ensure your project meets these requirements:- Modern browser with ES6+ support (Chrome 100+, Firefox 100+)
- Node.js 18+ and package manager (pnpm, npm, or yarn) for NPM installation
Installation
- NPM / PNPM
- IIFE (Script Injection)
1
Configure npm registry
Add the registry to your
.npmrc file:.npmrc
Contact [email protected] to receive your authentication token.
2
Install the package
Quick start
Here’s a minimal example to get the SDK running in your application:SDK methods
initializeAiChatSdk
Initializes the SDK with your API key and configuration options.apiKey: Your Zero Click AI API keyoptions: Configuration options (optional)listeners: Array of event listener functions (optional)
getAiChatSdk
Retrieves the initialized SDK instance.initializeChat
Opens the chat panel with an optional initial message.initialMessage: Optional message to send when opening the chat
Build formats
The SDK is distributed in multiple formats for maximum compatibility:| Format | File | Use Case |
|---|---|---|
| IIFE | ai-chat-sdk.iife.js | Script tag or runtime script injection |
| ESM | ai-chat-sdk.js | Modern bundlers (Vite, Webpack, etc.) |
| CJS | ai-chat-sdk.cjs | Node or CommonJS environments |
.d.ts) for full IDE support.
Next steps
Configuration
Learn about all available configuration options
Events
Understand the event system and available events
Data providers
Integrate offer redirect URLs and cashback data
Customization
Customize branding, colors, and UI styles
Getting help
- Email support: [email protected]
- Sales inquiries: [email protected]

