Follow these steps to add the Voltai Widget to your website.Documentation Index
Fetch the complete documentation index at: https://docs.voltai.ai/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
You’ll need:- An API key from your Voltai dashboard
- Access to edit your website’s HTML
Installation
Configuration options
TheVoltai.load() function accepts a configuration object:
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your API key for authentication |
enableGuestUser | boolean | false | Allow users to chat without signing in |
authClickEvents | object | { mode: "observe" } | Control what happens after widget sign-in/sign-out button clicks. mode can be "observe" or "intercept" |
defaultOrgName | string | — | Preferred organization name for authenticated users who belong to multiple organizations |
title | string | "Voltai" | Text shown in the widget header |
initialMessage | string | — | Message shown in a dismissible popup the first time an unauthenticated user (guest or signed-out) opens the widget. Shown at most once per page load. If omitted, no popup is shown. |
hideWidgetButton | boolean | false | Hide the floating button (use with programmatic control) |
colors | object | — | Custom color theme (see Styling) |
hide | object | — | Hide specific UI elements (see Hide Elements) |
onReady | function | — | Called when the widget shell is mounted |
onAuthReady | function | — | Called when auth initialization has settled. Receives { isLoggedIn, isGuest } |
onOpen | function | — | Called when widget opens |
onClose | function | — | Called when widget closes |
Basic example
Here’s a complete HTML page with the widget:What happens next
Once initialized:- A floating button appears in the bottom-right corner of your page
- Users click the button to open the chat panel
- They can type questions and receive AI-powered responses
- The widget automatically handles the conversation flow
Troubleshooting
Widget doesn’t appear- Check that the JS file is loaded (look for 404 errors in browser console)
- Verify your API key is correct
- Make sure
Voltai.load()is called after the script loads
- Double-check your API key
- If using guest mode, ensure
enableGuestUser: trueis set