# How to add an AI chatbot to a plain HTML website

**Paste one `<script>` tag just before `</body>` on every page, or once in your shared template. The chatbot loads by itself and answers from your site's pages.** Get the key first at [/get-api-key](/get-api-key), or have your AI agent request it with [one API call](/install#step-2-request-a-key).

```html
<!doctype html>
<html>
  <body>
    <!-- your page -->
    <script src="https://onelinechat.com/widget.js" data-key="olc_pub_YOUR_KEY" async></script>
  </body>
</html>
```

## Notes

- Using a site generator or a templating engine? Put the line in the layout that every page extends.
- Keep `async` (it's already in the snippet): the browser keeps rendering your page while the widget downloads.
- Your free tier covers the first 100 conversations. After that, payment is required: Pro is $39/month.

---
Source: https://onelinechat.com/install/html · Last updated: 2026-11-20 · All docs: https://onelinechat.com/llms.txt
