Prerequisite You should be all setup with your API Credentials before starting this tutorial.

Prerequisite You should have successfully trained at least one Avatar from the app.

Get a look at your avatar and voice resources

In order to generate your first video through our API, you’ll need to know which avatar and voice you want to use.

Not finding your Avatar? It might not be ready yet. Check at your Avatars page for updates.

You are done with this step if you have the id of the avatar and and the id of the voice you want to use for the next steps.

Create a video

Create a video by running a POST request on the /videos route.

Check the Video creation API Reference to run the request using an interactive UI.

To create a Video resource, you’ll need:

  • A name for the video
  • A list of Moment objects, representing segments of your final video. For each moment, you will be able to choose the avatar, the voice and the transcript to be used.

For each moment, you can also optionally specify:

  • An audioUrl to be used as voice for the moment. This audio will override our voice generation.
  • A gestureSlug to select which gesture from the avatar should be used for the moment.

You are done with this step if the request returned a status 200 and a Video object as body.
Note the Video id for the next step.

Render the video you have created

Render a video by running a POST request on the /render/[video_id] route.

Check the Render API Reference to run the request using an interactive UI.

You are done with this step if the route returned a Video object, with its status set to GENERATING_AUDIO or GENERATING_VIDEO.

Check for updates until your avatar's video generation is finished

Get your video’s updates by running a GET request on the /videos/[id] route.

Check the Videos API Reference to run the request using an interactive UI.

You are done with this step once the route returns a Video object with status set to IDLE and a videoUrl field not empty.

Retrieve your avatar's video

From the Video object you obtains in the previous step, retrieve the videoUrl field.

Use this url anywhere to download / share / publish your video and automate your workflow.