Martin ツ
05/16/2024, 2:36 AMVapi Support
05/16/2024, 2:36 AMVapi Support
05/16/2024, 2:36 AMhtml
<script>
var vapiInstance = null;
const assistant = "<your-assistant-id>";
const apiKey = "<your-api-key>";
const buttonConfig = {
width: "100px",
height: "100px",
idle: {
color: "rgb(93, 254, 202)",
type: "pill",
title: "Have a quick question?",
subtitle: "Talk with our AI assistant",
icon: "https://unpkg.com/lucide-static@0.321.0/icons/phone.svg",
},
loading: {
color: "rgb(93, 124, 202)",
type: "pill",
title: "Connecting...",
subtitle: "Please wait",
icon: "https://unpkg.com/lucide-static@0.321.0/icons/loader-2.svg",
},
active: {
color: "rgb(255, 0, 0)",
type: "pill",
title: "Call is in progress...",
subtitle: "End the call.",
icon: "https://unpkg.com/lucide-static@0.321.0/icons/phone-off.svg",
},
};
(function (d, t) {
var g = document.createElement(t),
s = d.getElementsByTagName(t)[0];
g.src = "https://cdn.jsdelivr.net/gh/VapiAI/html-script-tag@latest/dist/assets/index.js";
g.defer = true;
g.async = true;
s.parentNode.insertBefore(g, s);
g.onload = function () {
vapiInstance = window.vapiSDK.run({
apiKey: apiKey,
assistant: assistant,
config: buttonConfig,
});
};
})(document, "script");
</script>
Vapi Support
05/16/2024, 2:37 AMMartin ツ
05/16/2024, 2:37 AMSahil
05/16/2024, 10:16 AMSahil
05/16/2024, 10:16 AM