Quickstart
Embed a pre-recorded video paired with a live D-ID agent in a few minutes
Add a pre-recorded video that viewers can pause to converse with a live D-ID agent. No backend required — just a script tag and a client key.
Quick setup
Create an agentic video
Create an agentic video from a source video URL and a presenter. The presenter_id must be a v4 Expressive Avatar. The agent is built asynchronously, so the response returns immediately with a video_id:
curl -X POST "https://api.d-id.com/agentic-videos" \
-H "Authorization: Basic <YOUR KEY>" \
-H "Content-Type: application/json" \
-d '{
"source_url": "https://path.to.directory/movie.mp4",
"name": "Product walkthrough",
"presenter_id": "public_mia_elegant@avt_TJ0Tq5"
}'{
"video_id": "agv_abc123",
"status": "created"
}Save the video_id. The video processes asynchronously — the Ask experience appears in the embed once its status reaches done. You can also create agentic videos in D-ID Studio.
Create a client key
Generate a client key for authenticating your embed. The key only works from the allowed domains you specify:
curl -X POST "https://api.d-id.com/agents/client-key" \
-H "Authorization: Basic <YOUR KEY>" \
-H "Content-Type: application/json" \
-d '{
"allowed_domains": ["http://localhost:3000", "https://yourdomain.com"]
}'{
"client_key": "Z29vZ2xlLW9hdXRoMnwx...",
"created_at": "2026-07-01T10:00:00.000Z"
}Save the client_key from the response — you need it for the embed.
Add the embed script
Add the script tag and a mount element to your HTML:
<script
type="module"
src="https://agentic-videos.d-id.com/v1/index.js"
data-client-key="{client_key}"
data-agentic-video-id="{agentic_video_id}"
data-target-id="my-mount"
></script>
<div id="my-mount"></div>Replace {client_key} and {agentic_video_id} with your values. The player renders inside #my-mount and the Ask pill appears once the agent is ready.
Updated 2 months ago
