Create your first video with Synthesia API
Create and use your API key
To use Synthesia API, start by creating your API key:
- Go in the upper right corner of the Synthesia application and click on your account.
- Select Integrations
- Click on
Add
to add a new Synthesia API key. - Copy this key thanks to the 3-dot button on the right side of your API key.
![](https://files.readme.io/ddb7e2c-image.png)
Enter the copied API key in the Authorization header of any endpoint to have it available. Click on Try it!
in order to test the endpoint.
![](https://files.readme.io/f0b85f3-image.png)
Create your first video
In the Synthesia API documentation enter the API key you copied from above in the Create a video endpoint section and enter the following value for the endpoint parameters (leave all other parameters to default value):
Parameter | Value |
---|---|
test | true |
title | My first Synthetic video |
scriptText | Hello, World! This is my first synthetic video, made with the Synthesia API! |
avatar | anna_costume1_cameraA |
background | green_screen |
Once done press the Try it!
, if successful you should receive a 201-status code that looks like this:
![](https://files.readme.io/8e31702-image.png)
Note: Store the video ID returned, it is required for the rest of the quick start, in the image above the id is: 00db5057-ad78-49ab-9e1d-00f1cd891273
Go into your Synthesia account under the My video section to confirm the newly created video:
![](https://files.readme.io/e2d9e90-image.png)
Download the video
As soon as you create a video, Synthesia begins processing it. This can take from 3 to 5 minutes. Poll the Retrieve a video endpoint to see the video status:
When the video is ready for playback, the video status
changes to complete
, the response includes then a time-limited download link in the download
attribute, use this link to download the video as an .mp4
with:
curl ${DOWNLOAD_URL} --output my_first_synthetic_video.mp4
And done! You have created your first video and downloaded it. Note that rather than polling Synthesia API, it is possible to configure a webhook to which Synthesia sends a notification when a video completes successfully. Refer to the Synthesia webhook API documentation to learn how to leverage it.
See the Synthesia detailed API reference to discover all possible calls and parameters.