Express Avatars Quickstart

Create a custom avatar from your own video footage

Create your own custom avatar from video footage. Express Avatars require a consent verification process to prevent misuse, then you can generate unlimited videos with your avatar.

Create a consent

Start by creating a consent challenge. This returns a script that must be read aloud in a video.

curl -X POST "https://api.d-id.com/consents" \
  -H "Authorization: Basic <YOUR KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "language": "english"
  }'
{
  "id": "cst_abc123",
  "text": "I, [user name] confirm that I have all the necessary rights or consents to use this footage and voice recording for creating an Avatar. This is my dynamic passcode lake, grass, salad",
  "created_at": "2024-01-15T10:30:00.000Z"
}

Save the id (consent_id) and text. The consent expires in 30 minutes.

Upload the consent video

Record a video of the avatar subject reading the consent text aloud, replacing [user name] with the avatar name. Upload the video to your storage and submit the URL.

curl -X POST "https://api.d-id.com/consents/cst_abc123" \
  -H "Authorization: Basic <YOUR KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Alex",
    "source_url": "https://your-storage.com/alex-consent-video.mp4"
  }'

Wait for consent verification to complete (status becomes done).

Create the Express Avatar

Record at least 1 minute of footage of the avatar subject speaking naturally. Upload to your storage and create the avatar.

curl -X POST "https://api.d-id.com/scenes/avatars" \
  -H "Authorization: Basic <YOUR KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Alex",
    "consent_id": "cst_abc123",
    "source_url": "https://your-storage.com/alex-training-video.mp4",
    "persist": true
  }'
{
  "id": "avt_xyz789",
  "object": "scene_avatar",
  "status": "validating",
  "created_at": "2024-01-15T10:35:00.000Z"
}

Save the id — you'll need it to check status and create videos.

Check avatar status

Poll the GET endpoint until the status changes to done. Avatar training typically takes 5-10 minutes.

curl -X GET "https://api.d-id.com/scenes/avatars/avt_xyz789" \
  -H "Authorization: Basic <YOUR KEY>"
{
  "id": "avt_xyz789",
  "status": "done",
  "voice_id": "IfhpAQ4yN4MQ9ykyw3iK",
  "thumbnail_url": "https://scenes-avatars.d-id.com/.../thumbnail.png"
}

Save the voice_id to use the cloned voice in videos.

Create a video with your avatar

Use your avatar to generate videos. Include the avatar_id and optionally the cloned voice_id.

curl -X POST "https://api.d-id.com/scenes" \
  -H "Authorization: Basic <YOUR KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "avatar_id": "avt_xyz789",
    "script": {
      "type": "text",
      "input": "Hello! This is my custom Express Avatar speaking.",
      "provider": {
        "type": "elevenlabs",
        "voice_id": "IfhpAQ4yN4MQ9ykyw3iK"
      }
    }
  }'
{
  "id": "scn_def456",
  "object": "scene",
  "status": "created",
  "created_at": "2024-01-15T10:45:00.000Z"
}

Get your video

Poll the GET endpoint until the status changes to done, then retrieve the video.

curl -X GET "https://api.d-id.com/scenes/scn_def456" \
  -H "Authorization: Basic <YOUR KEY>"
{
  "id": "scn_def456",
  "status": "done",
  "result_url": "https://result.d-id.com/.../video.mp4"
}

Download your video from the result_url. The URL is valid for 24 hours.