LiveKit docs › Models › Virtual avatar › D-ID

---

# D-ID Realtime Avatar integration guide

> How to use the D-ID virtual avatar plugin for LiveKit Agents.

Available in:
- [ ] Node.js
- [x] Python

## Overview

[D-ID's](https://www.d-id.com/) Realtime Avatars let you create your own avatar that can participate in live, interactive conversations. You can use the open source D-ID integration for LiveKit Agents in your voice AI app.

### Installation

**Python**:

```shell
uv add "livekit-agents[did]~=1.5"

```

### Authentication

The D-ID plugin requires a [D-ID API key](https://docs.d-id.com/reference/basic-authentication).

Set `DID_API_KEY` in your `.env` file.

### Usage

Use the plugin in an `AgentSession`. For example, you can use this avatar in the [Voice AI quickstart](https://docs.livekit.io/agents/start/voice-ai.md).

**Python**:

```python
from livekit import agents
from livekit.agents import AgentServer, AgentSession
from livekit.plugins import did

server = AgentServer()

@server.rtc_session(agent_name="my-agent")
async def my_agent(ctx: agents.JobContext):
   session = AgentSession(
      # ... stt, llm, tts, etc.
   )

   avatar = did.AvatarSession(
      agent_id="...",  # ID of the D-ID avatar to use. See "Avatar setup" for details.
   )

   # Start the avatar and wait for it to join
   await avatar.start(session, room=ctx.room)

   # Start your agent session with the user
   await session.start(
      # ... room, agent, room_options, etc....
   )

```

Preview the avatar in [Agent Console](https://docs.livekit.io/agents/start/console.md) or a frontend [starter app](https://docs.livekit.io/agents/start/frontend.md#starter-apps) that you build.

### Avatar setup

This plugin only supports v4 avatars (type: expressive). To retrieve an agent ID, create a new agent:

```shell
curl -X POST https://api.d-id.com/agents \
  -H "Authorization: Basic <YOUR_API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "presenter": {
      "type": "expressive",
      "presenter_id": "public_mia_elegant@avt_TJ0Tq5"
    },
    "preview_name": "My Expressive Agent"
  }'

```

Use the agent ID from the response as the `agent_id` parameter in the plugin.

### Parameters

This section describes some of the available parameters. See the [plugin reference](https://docs.livekit.io/reference/python/livekit/plugins/did/index.html.md#livekit.plugins.did.AvatarSession) for a complete list of all available parameters.

- **`agent_id`** _(string)_ (optional): ID of the D-ID avatar to use. See [Avatar setup](#avatar-setup) for details.

- **`avatar_participant_name`** _(string)_ (optional) - Default: `did-avatar-agent`: The name of the participant to use for the avatar.

## Additional resources

The following resources provide more information about using D-ID with LiveKit Agents.

- **[D-ID API docs](https://docs.d-id.com/docs/quickstart)**: D-ID's API docs.

- **[Agents Console](https://docs.livekit.io/agents/start/console.md)**: A virtual workbench to test your avatar agent.

- **[Frontend starter apps](https://docs.livekit.io/agents/start/frontend.md#starter-apps)**: Ready-to-use frontend apps with avatar support.

---

This document was rendered at 2026-06-07T11:35:00.926Z.
For the latest version of this document, see [https://docs.livekit.io/agents/models/avatar/plugins/did.md](https://docs.livekit.io/agents/models/avatar/plugins/did.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).