Discussions

Ask a Question
Back to All

I need some help

Dear D-ID Support Team,

I am currently developing an AI-powered virtual host using your D-ID avatars. The goal is for this AI avatar to welcome visitors at the entrance of a business complex, and then automatically call the correct tenant via Twilio.

Here is the integration flow I have in mind:

A visitor speaks with the D-ID avatar (via speech or text).
D-ID processes the message and forwards it to an AI (RAG model).
The AI searches a database for the correct tenant and sends the phone number to Twilio.
Twilio automatically calls the tenant and informs them of the visitor’s arrival.
I currently have the D-ID agent working inside the Developer Hub and the Twilio API active, but I am struggling to correctly connect D-ID and Twilio.

Could you assist me with the following questions?

What is the correct method to set up a webhook within the D-ID agent to trigger an API call to Twilio?
Does D-ID support direct API integration with Twilio, or does this require an external backend?
Is there any documentation or an example script I can follow to correctly configure this connection?
I appreciate your guidance and look forward to your response.

Project Description: AI-Powered Virtual Host for a Business Complex
🎯 Project Goal
Develop an AI-powered virtual host (avatar) that welcomes visitors at the entrance of a business complex and helps them find the correct tenant. The AI host should support both speech and text input and automatically call the correct tenant via Twilio.

🔹 Step-by-Step Plan
🔸 1. Setting Up the D-ID Avatar
Create a virtual avatar in D-ID that can understand and respond via speech and text.
Integrate the avatar into a WordPress full-screen page.
The visitor must be able to speak or type to specify which company they are visiting.
🔸 2. Connecting to a Database (RAG Model)
Store a list of companies, names, and phone numbers.
AI should find the correct tenant from the database (via RAG).
🔸 3. Integrating Twilio for Automated Calling
The AI should automatically call the tenant via Twilio.
Option 1: Direct API connection between D-ID, RAG, and Twilio.
Option 2: A webhook that sends a signal to a backend server, which then triggers Twilio.
🔸 4. Testing and Optimization
Ensure that the AI responds correctly.
Test whether Twilio calls the correct person.
Fine-tune AI responses.
🔹 Required API Integrations
1️⃣ D-ID API – For managing and controlling the avatar

Endpoint: https://api.d-id.com/agents
Functionality: Avatar creation, speech processing, response generation
Authentication: Bearer Token
2️⃣ Twilio API – For making automated calls to tenants

Endpoint: https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/Calls.json
Functionality: Initiate calls to tenants
Authentication: Basic Auth (Twilio Account SID & Auth Token)
3️⃣ RAG (Retrieval-Augmented Generation) System – For searching tenant information

Data: List of companies and their contact details
Logic: AI searches for a match and sends the phone number to Twilio
📧 Email to D-ID Support
Subject: Assistance Needed: Connecting D-ID Agent to Twilio API


Best regards, Lloyd