Using the Avatar API

The Avatar API generates videos using a digital avatar speaking from a provided transcript or recording.

Overview

Using the Avatar API you can generate an avatar video from a text prompt or audio input. Options with the endpoint allow you to:

The Avatar API is an asynchronous API. The API returns a job ID immediately after the request is submitted. The job status can be checked using the GET Result API.

Prerequisites

You'll need:

Review the Getting Started page for authentication and setup.

Quickstart

Use the commands below to generate an avatar video.

In the cURL commands, be sure to update:

Generate a video from plain text input

curl 'https://audio-video-api.adobe.io/v1/generate-avatar' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-api-key: <client_ID>' \
  --data-raw '{
    "script": {
        "text": "<script_text>",
        "mediaType": "text/plain",
        "localeCode": "en-US"
    },
    "voiceId": "<voice_ID>",
    "avatarId": "<avatar_ID>",
    "output": {
        "mediaType": "video/mp4"
    }
}'

Generate a video from a text file input

curl 'https://audio-video-api.adobe.io/v1/generate-avatar' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-api-key: <client_ID>' \
  --data-raw '{
    "script": {
        "source": {
            "url": "<pre_signed_URL_of_text_file>"
        },
        "mediaType": "text/plain",
        "localeCode": "en-US"
    },
    "voiceId": "<voice_ID>",
    "avatarId": "<avatar_ID>",
    "output": {
        "mediaType": "video/mp4"
    }
}'

Generate a video from an audio file input

curl 'https://audio-video-api.adobe.io/v1/generate-avatar' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-api-key: <client_ID>' \
  --data-raw '{
    "audio": {
        "source": {
            "url": "<pre_signed_URL_of_input_audio>"
        },
        "mediaType": "audio/wav",
        "localeCode": "en-US"
    },
    "avatarId": "<avatar_ID>",
    "output": {
        "mediaType": "video/mp4"
    }
}'  

Use a custom background

Change the background of the Avatar video by providing a pre-signed URL of a video or image, or opt for a transparent or color background to use as a replacement.

data-slots=heading, text
NOTE
Refer to the Technical Usage notes to understand the supported formats, aspect ratio, etc. for video and image backgrounds.

Generate a video from text input with a video background

curl 'https://audio-video-api.adobe.io/v1/generate-avatar' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-api-key: <client_ID>' \
  --data-raw '{
    "script": {
        "text": "<script_text>",
        "mediaType": "text/plain",
        "localeCode": "en-US"
    },
    "voiceId": "<voice_ID>",
    "avatarId": "<avatar_ID>",
    "output": {
        "mediaType": "video/mp4",
        "background": {
            "type": "video",
            "source": {
                "url": "<pre_signed_URL_of_background_video>"
            }
        }
    }
}'  

Generate a video from text input with an image background

curl 'https://audio-video-api.adobe.io/v1/generate-avatar' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-api-key: <client_ID>' \
  --data-raw '{
    "script": {
        "text": "<script_text>",
        "mediaType": "text/plain",
        "localeCode": "en-US"
    },
    "voiceId": "<voice_ID>",
    "avatarId": "<avatar_ID>",
    "output": {
        "mediaType": "video/mp4",
        "background": {
            "type": "image",
            "source": {
                "url": "<pre_signed_URL_of_background_image>"
            }
        }
    }
}'  

Generate a video from text input with a color background

curl 'https://audio-video-api.adobe.io/v1/generate-avatar' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-api-key: <client_ID>' \
  --data-raw '{
    "script": {
        "text": "<script_text>",
        "mediaType": "text/plain",
        "localeCode": "en-US"
    },
    "voiceId": "<voice_ID>",
    "avatarId": "<avatar_ID>",
    "output": {
        "mediaType": "video/mp4",
        "background": {
            "type": "color",
            "color": "#ffffff"
        }
    }
}'  

Generate a video from text input with a transparent background

curl 'https://audio-video-api.adobe.io/v1/generate-avatar' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-api-key: <client_ID>' \
  --data-raw '{
    "script": {
        "text": "<script_text>",
        "mediaType": "text/plain",
        "localeCode": "en-US"
    },
    "voiceId": "<voice_ID>",
    "avatarId": "<avatar_ID>",
    "output": {
        "mediaType": "video/webm",
        "background": {
            "type": "transparent"
        }
    }
}'  

Check the result

Use the GET Result API to see the status of a job. In the command below, update:

curl --location '<status_URL>' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-api-key: <client_ID>' 

Sample Avatar API response

{
    "jobId": "986fc222-1118-4242-b326-eb9873e3982f",
    "status": "succeeded",
    "output": {
        "destination": {
            "url": "<pre_signed_URL_of_the_result>"
        }
    }
}

Use the url to download the generated video.

Verify with Content Credentials

Adobe participates in the content authentication initiative for AI-generated assets, addressing concerns around content legitimacy. Register your content by uploading the file at ContentCredential.org.