kavindya_k
09/04/2025, 8:09 AMAI Evy
09/04/2025, 8:09 AMAI Evy
09/04/2025, 8:09 AM<head> tag :
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
type="module"
data-public-key="YOUR_RETELL_PUBLIC_KEY"
data-agent-id="YOUR_CHAT_AGENT_ID"
data-agent-version="YOUR_AGENT_VERSION"
data-title="YOUR_CUSTOM_TITLE"
data-logo-url="YOUR_LOGO_URL"
data-color="YOUR_CUSTOM_COLOR"
data-bot-name="YOUR_BOT_NAME"
data-popup-message="YOUR_POPUP_MESSAGE"
data-show-ai-popup="true"
data-show-ai-popup-time="5"
data-auto-open="false"
data-dynamic='{"key": "value"}'
></script>
Before embedding the widget, you'll need :
1. **Create an Agent**: For chat widget, create a chat agent using the Create Chat Agent guide
2. **Get Your Credentials**: Your Retell Public Key and your Retell agent ID
The widget is embeddable via a single <script> tag and uses the Retell public key system, allowing direct API calls from the frontend—no backend proxy required . You can copy and paste the embed script into your website, replace the publicKey, agentId, and version, and customize the widget name [(2) ]() .AI Evy
09/04/2025, 8:09 AMAI Evy
09/04/2025, 8:09 AMkavindya_k
09/04/2025, 8:11 AM