dzei2234
12/01/2025, 1:00 PMAI Evy
12/01/2025, 1:00 PMAI Evy
12/01/2025, 1:00 PM<head> section of your HTML:
html
<script
id="retell-widget"
src="<https://dashboard.retellai.com/retell-widget.js%22>
data-public-key="YOUR_RETELL_PUBLIC_KEY"
data-agent-id="YOUR_CHAT_AGENT_ID"
></script>
Required attributes:
- data-public-key - Your Retell public key
- data-agent-id - Your chat agent ID
Optional customization attributes include:
- data-title - Custom chat window title
- data-logo-url - URL of your logo image
- data-color - Hex color code for widget theme
- data-bot-name - Bot name for popup messages
- data-popup-message - Popup message before users open chat
- data-auto-open - Set to "true" to auto-open chat widget on page load
The widget displays as a floating button (robot icon) in the bottom right corner. When users click it, a chat interface opens in a modal window where they can interact with your AI agent.AI Evy
12/01/2025, 1:00 PMAI Evy
12/01/2025, 1:00 PMdzei2234
12/01/2025, 1:31 PMAI Evy
12/01/2025, 1:31 PMAI Evy
12/01/2025, 1:31 PMdata-title - Custom chat window title
- data-logo-url - URL of your logo image
- data-color - Hex color code for widget themeAI Evy
12/01/2025, 1:31 PMAI Evy
12/01/2025, 1:31 PMdzei2234
12/01/2025, 1:48 PMAI Evy
12/01/2025, 1:48 PMAI Evy
12/01/2025, 1:48 PMAI Evy
12/01/2025, 1:48 PMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const chatResponse = await client.chat.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(chatResponse.agent_id) ;
The response includes:
- transcript - Full text transcript of the conversation
- message_with_tool_calls - Detailed message array with role, content, and timestamps
- chat_status - Current status (ongoing, ended, or error)
- start_timestamp and end_timestamp - Session timing information
- chat_analysis - Includes chat summary, user sentiment, and whether the chat was successful
You can also use the List Chat API to retrieve multiple chat sessions.
**AI Evy
12/01/2025, 1:48 PM