Embed the xMagic Chatbot
Easily add the xMagic conversational AI to your website in minutes. Follow these steps to embed the chatbot into your site.
Step 1: Make your agent public
Making your agent public:
Go to xMagic → Access control in the bottom-left corner of the sidebar.
After the pop-up appears, under General Access, set your agent to Public
.

Step 2: Get your embed code snippet
How to get your embed code snippet:
Go to xMagic → Configurations in the left sidebar.
Click Embed code in the top-right corner of the page:
Your embed code snippet will look like:
<script defer>
window.xChatEmbed = "https://xmagic.ai/embed?xmagic_id=abcd1234";
</script>
<script defer src="https://downloads.stochastic.ai/xchat/embed-v4.js"></script>
Case1: If you have access to the HTML code, then just paste the above
snippet in the <head>
tag of your site's HTML.
Case2: If you are using a website builder like Webflow or Wix, please check for their specific intructions below.
Embed chatbot instructions for different website builder
Webflow
- For website built using Webflow Click here
Wix
- For website built using Wix Click here