Embed your AI agent directly into your website with a simple script tag. This integration provides a lightweight, customizable chat widget that loads asynchronously and doesn't block page rendering.
GET /api/embed.jsToken-based authentication via query parameter
1000 requests per hour per domain
curl "https://your-domain.com/api/embed.js?agent_id=YOUR_AGENT_ID&token=YOUR_TOKEN"<script src="https://your-domain.com/api/embed.js?agent_id=YOUR_AGENT_ID&token=YOUR_TOKEN"></script>
<script>
CentralAI.embed({
agentId: 'YOUR_AGENT_ID',
container: document.body,
position: 'bottom-right', // 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'
theme: 'light', // 'light' | 'dark'
primaryColor: '#70FF5B'
});
</script>Solution: Check browser console for errors, verify agent_id and token are correct, ensure domain is whitelisted
Solution: Ensure your domain is added to the whitelist in integration settings