🎯 Live Demo

Try it now - paste policy text or load a sample

💡 Don't have a password? No problem! The demo mode below uses unlimited simulated responses. Password holders get 5 real OpenAI-powered analyses per day.

🚀 Quick Start

Add to your website in 30 seconds

1. Include Script

<script type="module" src="https://cdn.jsdelivr.net/gh/RichardTrujilloTorres/insurai-widget@main/dist/insurai-analyzer.js"></script>

2. Add Component

<insurai-analyzer
  api-url="YOUR_API_URL"
></insurai-analyzer>

3. Customize (Optional)

<insurai-analyzer
  api-url="YOUR_API_URL"
  theme="dark"
  default-type="health"
></insurai-analyzer>

✨ Features

Everything you need for insurance policy analysis

Core Features

  • AI-powered analysis via OpenAI
  • Extracts coverage, deductibles, exclusions
  • Risk level assessment
  • Legal review flags
  • Recommended actions

Developer Features

  • Zero dependencies (except Lit)
  • Light/dark theme support
  • Custom events for integration
  • Fully typed with JSDoc
  • Mobile responsive

Production Ready

  • Error handling built-in
  • Loading states
  • CORS-ready API calls
  • Accessible (ARIA)
  • < 50KB bundle size

⚙️ Configuration

Available attributes and options

Attributes

<insurai-analyzer
  api-url="string"                     
  theme="light|dark"                   
  default-type="health|auto|..."       
  default-jurisdiction="US|CA|..."     
  demo-password="string"               
></insurai-analyzer>

💡 Demo Mode: Without demo-password, the widget uses simulated responses (free, unlimited). With a valid password, it uses the real API (5 calls/day per user).

Events

// Listen for completion
element.addEventListener('analysis-complete', (e) => {
  console.log('Result:', e.detail);
});

// Listen for errors
element.addEventListener('analysis-error', (e) => {
  console.log('Error:', e.detail.error);
});

Programmatic API

const analyzer = document.querySelector('insurai-analyzer');

// Set policy text
analyzer.policyText = "Your policy...";

// Trigger analysis
await analyzer.analyze();

// Access result
console.log(analyzer.result);

Ready to add to your site?

Join the developers using InsurAI to power their insurance apps