HTML
Add an AI Chatbot to an HTML Website
The baseline install: two CDN tags and a mount call, pasted before the closing body tag. No build step, no framework, no server.
How it works
If you can edit the HTML file, you can finish this in about five minutes.
Create the chatbot
Sign in, upload a document or add a website page, and finish the create wizard. Wait until the first source finishes processing.
Copy the embed code
Open the chatbot in the Chatbots area and copy its embed code. It already carries your chatbot key, so nothing else needs configuring.
Paste before the closing body tag
Open your HTML file and paste the snippet immediately above the closing body tag. Repeat on every page you want the widget on, or use a shared include.
Upload and test
Upload the file to your host and open the page. Ask a question your uploaded source answers to confirm the key and the sources are wired up.
The snippet
Paste this immediately before the closing body tag of your page.
<link rel="stylesheet" href="https://cdn.cortexvia.in/chatbotsdk-web.css" />
<script src="https://cdn.cortexvia.in/chatbotsdk-web.iife.js"></script>
<div id="cv-chat"></div>
<script>
window.ChatbotSDK.mount("#cv-chat", {
chatbotKey: "ctx-cb-xxxxxxxxxxxxxxxx",
config: {
mode: "chatbot",
position: "bottom-right"
}
});
</script>Replace the placeholder key with the one from your Chatbots area. Everything else can stay as it is.
- Before the closing body tag, not in the head
- The container element must appear before the script that mounts into it
- mode chatbot is the floating launcher, mode chat is an inline panel
Matching your site
Every value below exists in the shipped config, so you can brand the widget without writing CSS.
<script>
window.ChatbotSDK.mount("#cv-chat", {
chatbotKey: "ctx-cb-xxxxxxxxxxxxxxxx",
config: {
mode: "chatbot",
title: "Support Assistant",
inputPlaceholder: "Ask anything...",
position: "bottom-right",
styleOverrides: {
widget: {
launcher: { backgroundColor: "#111827" },
wrapper: { zIndex: 9999 }
},
layout: {
header: { backgroundColor: "#111827" }
},
userMessage: {
bubble: { backgroundColor: "#111827", color: "#ffffff" }
}
}
}
});
</script>Style overrides take ordinary CSS property objects per region of the widget, so the launcher, header, and message bubbles can follow your palette.
- title and inputPlaceholder set the copy your visitors read
- position accepts bottom-right or bottom-left
- The full list of keys is in the embed config reference
Why Cortexvia
A script embed with local currency pricing, with the trust pages published up front.
No build step
Two tags and a mount call. Nothing to compile, no package manager, no framework, which is exactly why this works on the oldest sites.
Two requests, both cached
One stylesheet and one script from the CDN, so repeat visitors get them from cache rather than re-downloading the widget.
Does not touch your markup
The widget renders inside the container you point it at, so your existing CSS and layout are left alone.
Local pricing, free tier to test
Plans are priced in your local currency, and the free tier is enough to put one chatbot on a live page.
Questions
What people ask before pasting a script into a hand-written site.
More platforms
The same snippet works anywhere a script tag can go. Pick your platform for the exact steps.
Get started
Start on the free tier with a document or two, copy the snippet, and paste it before the closing body tag.
One snippet, one paste, done. This is the shortest path from nothing to a working chatbot on a live page.
