Retell Chat Widget
Learn how to embed the Retell chat widget on your website
Overview
The Retell embeddable chat widget is a production-ready, customizable, and secure chat widget for websites, powered by the Retell API. 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.
Create a Chat Agent
Before embedding the chat widget, you need a chat agent to handle the conversation.
For detailed instructions on creating a chat agent, refer to the Create Chat Agent guide.
Get Your Public Key and Agent ID
To embed the chat widget, you’ll need:
- Your Retell Public Key
- Your Retell agent ID (the ID of the chat agent you created)
Add the Widget to Your Website
Add the following script tag to your HTML, within head
tag:
Replace:
YOUR_RETELL_PUBLIC_KEY
with your actual Retell public keyYOUR_RETELL_CHAT_AGENT_ID
with your actual Retell agent IDYOUR_RETELL_CHAT_AGENT_VERSION
with your agent version (optional)YOUR_CUSTOM_TITLE
with your preferred chat window title (optional)
Test the Widget
After adding the widget to your website, test it by:
- Loading your website
- Clicking the floating button (bottom right, robot icon)
- Starting a conversation with your agent
The widget will automatically handle chat sessions and persist previous chats in localStorage.
Example: Minimal HTML Implementation
Here’s a complete example of a minimal HTML page with the Retell Chat Widget: