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:
- Select an avatar from a catalog of stock actors.
- Select a voice from a catalog of stock voices.
- Use your own audio file to create avatar videos.
- Set your own image/video as a video background.
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:
- Client ID
- Client secret
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:
Authorizationwith the bearer token.x-api-keywith the Client ID.mediaTypewith the correct input format.url(where applicable) with the generated pre-signed URL.avatarIdwith the unique ID of the avatar to be used for avatar generation. Users should refer to the GET Avatars API to choose the Avatar ID or refer to the Avatar Catalog to see the list of avatars.voiceIdwith the unique ID of the voice to be used for avatar generation. Users should refer to the GET Voices API to choose the Voice ID.
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
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:
statusUrlwith the URL returned in the response of the Avatar API call.Authorizationwith the bearer token.x-api-keywith the Client ID.
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.