Animations Overview πŸ“™

✴️ Animations Overview


Live Portrait (Animations), breathes life into any still photo. The Live Portrait process uses a driver video to animate a person in a still photo to precisely match the driver’s head movement, facial expressions, emotions and even voice. This artificial intelligence based technology brings a whole new dimension to photos and images, allowing them to be seen in a totally new and fresh way.

✴️ Interface

Input
Photo URL + Driver ID
Output
Video URL


Photo Driver Video

✴️ Example #1: Default Call

POST https://api.d-id.com/animations | Create an animation

{
    "source_url": "https://myhost.com/photo.jpg",
    "driver_url": "bank://nostalgia/"
}
{
    "id": "anm_nCX-f6MEP1IxIB89q3rdg",
    "created_at": "2023-03-23T12:42:28.410Z",
    "created_by": "google-oauth2|12345678",
    "status": "created",
    "object": "animation"
}

GET https://api.d-id.com/animations/<id> | Get a specific animation

Empty request body
See the Response tab
{
    "metadata": {
        "driver_url": "bank://nostalgia/driver-16/original",
        "faces": [
            {
                "mask_confidence": -1,
                "detection": [
                    205,
                    115,
                    504,
                    552
                ],
                "overlap": "no",
                "size": 618,
                "top_left": [
                    45,
                    25
                ],
                "face_id": 0,
                "detect_confidence": 0.9987131357192993
            }
        ],
        "num_frames": 198,
        "processing_fps": 33.086449377816,
        "resolution": [
            "512",
            "512"
        ],
        "size_kib": 2564.5400390625,
        "source_pose": [
            -3.785919189453125,
            -7.8801422119140625,
            5.22650146484375
        ],
        "video_fps": 20
    },
    "task": false,
    "created_at": "2023-03-23T12:42:28.410Z",
    "config": {
        "logo": {
            "url": "ai",
            "position": [
                0,
                0
            ]
        },
        "mute": true,
        "motion_factor": 0.75,
        "result_format": ".mp4"
    },
    "source_url": "https://d-id-animations-prod.s3.us-west-2.amazonaws.com/google-oauth2%7C103497474224771486/anm_nCX-f6MEP1IxIB89q3rdg/source/noelle.jpeg?AWSAccessKeyId=AKIA5CUMPJBIKVXURAND&Expires=1679661748&Signature=%2B1hHIG0VYWP4TAcRL%2F7D4EUIxSw%3D",
    "created_by": "google-oauth2|12345678",
    "status": "done",
    "driver_url": "bank://nostalgia/",
    "modified_at": "2023-03-23T12:42:35.152Z",
    "user_id": "google-oauth2|12345678",
    "face_ids": [
        0
    ],
    "result_url": "https://d-id-animations-prod.s3.us-west-2.amazonaws.com/google-oauth2%7C1034345131871486/anm_nCX-f6MEP1IxIB89q3rdg/noelle.mp4?AWSAccessKeyId=AKIA5CUMPJDFDFAND&Expires=1679661755&Signature=qb%2BdQUABdfdfFF4rdf4Q0%3D",
    "id": "anm_nCX-f6MEP1IxIB89q3rdg",
    "started_at": "2023-03-23T12:42:29.017"
}

The output video is located in the result_url field.

πŸ“˜

Note

The output video is ready only when "status": "done"

status field lifecycle:

"status": "created"When posting a new animations request
"status": "started"When starting the video processing
"status": "done"When the video is ready

Driver bank:

driver_urlDescription
bank://nostalgiaGentle and slow movements
bank://funFunky movements with funny facial expressions
bank://danceDancing heads movements
bank://classicsSinging movements | make sure to set "mute": false
bank://subtleSubtle movements | works best with multiple faces that are close to each other in a single image
bank://stitchWorks best when "stitch": true

Usage example: "driver_url": "bank://fun" will select the best-matched driver from the fun category.

You can also select a specific driver:
Usage example: "driver_url": "bank://dancing/driver-03"
Specific available drivers list:

// See specific drivers list in the Drivers List Tab above
// Usage example:

{
  "driver_url": "bank://nostalgia/driver-05"
}
"nostalgia/driver-01"
"stitch/driver-05"
"stitch/driver-10"
"classics/driver-rocking-around"
"subtle/driver-01"
"fun/driver-02"
"classics/driver-on-my-way"
"dance/driver-07"
"subtle/driver-08"
"classics/driver-feliz-navidad"
"classics/driver-hope-you-have-happy-birthday"
"dance/driver-04"
"classics/driver-country-fire"
"fun/driver-10"
"fun/driver-01"
"subtle/driver-10"
"nostalgia/driver-15"
"classics/driver-queen-of-the-night"
"dance/driver-11"
"stitch/driver-31"
"classics/driver-old-souls"
"stitch/driver-03"
"nostalgia/driver-09"
"classics/driver-its-good-to-be-alive"
"stitch/driver-07"
"stitch/driver-13"
"classics/driver-here-comes-santa-claus"
"stitch/driver-33"
"subtle/driver-13"
"nostalgia/driver-03"
"dance/driver-03"
"stitch/driver-04"
"subtle/driver-12"
"subtle/driver-11"
"nostalgia/driver-11"
"stitch/driver-24"
"classics/driver-la-cucaracha"
"fun/driver-04"
"classics/driver-happy-birthday-to-you"
"stitch/driver-11"
"subtle/driver-17"
"dance/driver-02"
"dance/driver-01"
"nostalgia/driver-12"
"dance/driver-09"
"stitch/driver-12"
"nostalgia/driver-04"
"dance/driver-08"
"nostalgia/driver-10"
"stitch/driver-30"
"nostalgia/driver-02"
"nostalgia/driver-06"
"nostalgia/driver-14"
"stitch/driver-22"
"stitch/driver-14"
"subtle/driver-02"
"classics/driver-la-traviata-female"
"stitch/driver-15"
"stitch/driver-08"
"stitch/driver-18"
"subtle/driver-04"
"subtle/driver-09"
"subtle/driver-03"
"stitch/driver-17"
"stitch/driver-21"
"nostalgia/driver-16"
"subtle/driver-05"
"stitch/driver-27"
"nostalgia/driver-07"
"stitch/driver-32"
"stitch/driver-25"
"subtle/driver-15"
"stitch/driver-16"
"stitch/driver-06"
"dance/driver-10"
"stitch/driver-23"
"nostalgia/driver-05"
"nostalgia/driver-08"
"dance/driver-06"
"dance/driver-05"
"stitch/driver-19"
"fun/driver-07"
"subtle/driver-19"
"classics/driver-amazing"
"stitch/driver-09"
"subtle/driver-07"
"fun/driver-09"
"subtle/driver-16"
"classics/driver-rigoletto"
"stitch/driver-20"
"fun/driver-06"
"subtle/driver-18"
"nostalgia/driver-17"
"subtle/driver-06"
"stitch/driver-26"
"stitch/driver-29"
"fun/driver-03"
"fun/driver-08"
"stitch/driver-02"
"classics/driver-la-traviata-male"
"fun/driver-05"
"subtle/driver-14"
"stitch/driver-01"

✴️ Example #2: Enabling Audio

Use for drivers that include a soundtrack

POST https://api.d-id.com/animations | Create an animation

{
    "source_url": "source_url": "https://myhost.com/photo.jpg",
    "driver_url": "bank://classics/",
    "config":
    {
        "mute": false
    }
}
{
    "id": "anm_XVzpJ18KeioAGKtllhVN3",
    "created_at": "2023-03-23T13:37:53.164Z",
    "created_by": "google-oauth2|12345678",
    "status": "created",
    "object": "animation"
}

✴️ Example #3: Webhooks

Simply create an endpoint on your side and add it in the webhook field.
Then the webhook endpoint will be triggered with the same response body once the video is ready.

POST https://api.d-id.com/animations | Create an animation

{
    "source_url": "https://myhost.com/photo.jpg",
    "driver_url": "bank://nostalgia/",
    "webhook": "https://myhost.com/webhook"
}
{
    "id": "anm_nCX-f6MEP1IxIB89q3rdg",
    "created_at": "2023-03-23T12:42:28.410Z",
    "created_by": "google-oauth2|12345678",
    "status": "created",
    "object": "animation"
}
{
    "metadata": {
        "driver_url": "bank://nostalgia/driver-16/original",
        "faces": [
            {
                "mask_confidence": -1,
                "detection": [
                    205,
                    115,
                    504,
                    552
                ],
                "overlap": "no",
                "size": 618,
                "top_left": [
                    45,
                    25
                ],
                "face_id": 0,
                "detect_confidence": 0.9987131357192993
            }
        ],
        "num_frames": 198,
        "processing_fps": 33.086449377816,
        "resolution": [
            "512",
            "512"
        ],
        "size_kib": 2564.5400390625,
        "source_pose": [
            -3.785919189453125,
            -7.8801422119140625,
            5.22650146484375
        ],
        "video_fps": 20
    },
    "task": false,
    "created_at": "2023-03-23T12:42:28.410Z",
    "config": {
        "logo": {
            "url": "ai",
            "position": [
                0,
                0
            ]
        },
        "mute": true,
        "motion_factor": 0.75,
        "result_format": ".mp4"
    },
    "source_url": "https://d-id-animations-prod.s3.us-west-2.amazonaws.com/google-oauth2%7C103497474224771486/anm_nCX-f6MEP1IxIB89q3rdg/source/noelle.jpeg?AWSAccessKeyId=AKIA5CUMPJBIKVXURAND&Expires=1679661748&Signature=%2B1hHIG0VYWP4TAcRL%2F7D4EUIxSw%3D",
    "created_by": "google-oauth2|12345678",
    "status": "done",
    "driver_url": "bank://nostalgia/",
    "modified_at": "2023-03-23T12:42:35.152Z",
    "user_id": "google-oauth2|12345678",
    "face_ids": [
        0
    ],
    "result_url": "https://d-id-animations-prod.s3.us-west-2.amazonaws.com/google-oauth2%7C1034345131871486/anm_nCX-f6MEP1IxIB89q3rdg/noelle.mp4?AWSAccessKeyId=AKIA5CUMPJDFDFAND&Expires=1679661755&Signature=qb%2BdQUABdfdfFF4rdf4Q0%3D",
    "id": "anm_nCX-f6MEP1IxIB89q3rdg",
    "started_at": "2023-03-23T12:42:29.017"
}

✴️ Video Tutorial

D-ID's API - Animations Endpoint
Live Coding Session


✴️ Support


Have any questions? We are here to help! Please leave your question in the Discussions section and we will be happy to answer shortly.

Ask a question