Widget Quick Start
Add LILA to your website in two steps. Copy two code snippets and your users can start asking questions about your data in natural language.
Prerequisites
- Active LILA account (Sign up here)
- Project created in Admin Dashboard
- API key generated for your project
Installation
Step 1: Add the Script
Add this script tag to your HTML <head> or before closing </body>:
<script type="module" src="https://embed.getlila.one/loader.js"></script>
Step 2: Add the Widget
Place the widget wherever you want the chat to appear:
<lila-widget
api-key="your-api-key-here"
jwt-token="GENERATED-JWT-TOKEN">
</lila-widget>
That’s it! The widget will load and connect to your LILA project automatically.
Full Example
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
<!-- Add LILA widget script -->
<script type="module" src="https://embed.getlila.one/loader.js"></script>
</head>
<body>
<h1>Welcome to My Site</h1>
<!-- Add LILA chat widget -->
<lila-widget
api-key="pk_live_abc123..."
jwt-token="eyJhbGciOiJIUzI1NiIs...">
</lila-widget>
</body>
</html>
Getting Your Credentials
Find your LILA API key by following these steps:
- Log into LILA Dashboard
- Select your project
- Go to Settings → Setup & Integration
- Copy your API Key
Next Steps
- Widget Configuration - Customize appearance and behavior
- Authentication Guide - JWT setup for production
- WordPress Integration - Plugin installation guide
- Laravel Integration - Blade template integration with JWT