Quickstart

Create an ElevenLabs-backed agent and connect to it in four steps

Connect a D-ID expressive avatar to your existing ElevenLabs Conversational AI agent in four steps.

Store your ElevenLabs API key as a secret

Save your ElevenLabs API key in D-ID's secret store. The agent references the key by secret_id instead of receiving it directly.

curl -X POST "https://api.d-id.com/secrets" \
  -H "Authorization: Basic <YOUR KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "api_key",
    "provider": "elevenlabs",
    "api_key": "<YOUR ELEVENLABS API KEY>"
  }'
{
  "id": "o0kaqea3v",
  "provider": "elevenlabs",
  "type": "api_key",
  "created_at": "2026-05-24T13:56:54.995",
  "sanitized_secret": "•••••••••"
}

Save the id — this is the secret_id you'll pass when creating the agent.

Create the ElevenLabs agent

Create the agent with an expressive presenter and the ElevenLabs configuration. The agent_id is your existing agent in the ElevenLabs dashboard; the secret_id is the one returned in step 1.

curl -X POST "https://api.d-id.com/v2/agents/integrations/elevenlabs" \
  -H "Authorization: Basic <YOUR KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "preview_name": "Mia",
    "presenter": {
      "type": "expressive",
      "presenter_id": "public_mia_elegant@avt_TJ0Tq5"
    },
    "external_agent": {
      "type": "elevenlabs",
      "agent_id": "<YOUR ELEVENLABS AGENT ID>",
      "secret_id": "<SECRET_ID_FROM_STEP_1>"
    }
  }'
{
  "id": "v2_agt_abc123",
  "preview_name": "Mia",
  "preview_description": "ElevenLabs-backed agent",
  "presenter": {
    "type": "expressive",
    "presenter_id": "public_mia_elegant@avt_TJ0Tq5"
  },
  "external_agent": {
    "type": "elevenlabs",
    "agent_id": "<YOUR ELEVENLABS AGENT ID>",
    "secret_id": "<SECRET_ID_FROM_STEP_1>"
  },
  "status": "started",
  "access": "unlisted",
  "embed": true,
  "client_key": "Y2xpZW50X2tleV9hYmMxMjM0NTY3ODk..."
}

Save the id and the auto-generated client_key. The agent's idle video is still being generated — wait for status: "done" before starting a session.

Wait until the agent is ready

Poll the agent until status becomes done. At that point the avatar's idle video is generated and the agent is ready to stream.

curl -X GET "https://api.d-id.com/agents/v2_agt_abc123" \
  -H "Authorization: Basic <YOUR KEY>"
{
  "id": "v2_agt_abc123",
  "preview_name": "Amber",
  "status": "done",
  "presenter": {
    "type": "expressive",
    "presenter_id": "v2_public_Amber@0zSz8kflCN",
    "idle_video": "https://clips-presenters.d-id.com/.../idle.mp4"
  }
}

The idle_video URL is now populated. You can start a session.

Start a session

Use the agent id and client_key from step 2 to connect to a live session. The integration forwards user audio to ElevenLabs and renders the response through the D-ID avatar. There are two ways to connect:

Embed — drop a script tag into your page. Best for the prebuilt agent UI with no frontend code.

See the Embed quickstart for the full setup and configuration.

<script src="https://agent.d-id.com/index.js"
        data-name="did-agent"
        data-agent-id="v2_agt_abc123"
        data-client-key="<CLIENT KEY FROM STEP 2>">
</script>

The client_key auto-generated in step 2 has no domains configured, so it only works inside D-ID Studio. Before embedding on your own site, update it with your domains:

curl -X PATCH "https://api.d-id.com/agents/v2_agt_abc123/client-keys/<CLIENT KEY FROM STEP 2>" \
  -H "Authorization: Basic <YOUR KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "allowed_domains": ["http://localhost:3000", "https://yourdomain.com"]
  }'

What’s Next

Did this page help you?