OneLineChat

How to add an AI chatbot to a Lovable app

Lovable projects are React + Vite apps, so the chatbot is one script tag in index.html. The fastest way is to ask Lovable to add it. Get your key at /get-api-key first. It takes your email and nothing else.

Paste this into the Lovable chat

Add this script tag to index.html, just before the closing body tag. Change nothing else. The data-key is public by design, like an analytics ID, so keep it inline in index.html: <script src="https://onelinechat.com/widget.js" data-key="olc_pub_YOUR_KEY" async></script>

Replace olc_pub_YOUR_KEY with your own key before you send it.

Notes

Last updated: · Markdown version