Create green background videos.
To create a green background video using HeyGen API, you would need to sign up for a HeyGen account and obtain an API key. Once you have your API key, you can use it to access the HeyGen API and create a video with a green background by following these steps:
-
Use "List Avatars" API endpoint to specify an avatar in your video, and select a voice in List voices API.
-
Prepare you footage of your avatar, a public audio URL or a text script will be acceptable.
-
Use the Create Video API endpoint to render the final video, and specify the background parameter as green (which is
#008000
in CSS color).
Keep in mind that this is just an example, and the specific details and parameters of the API endpoints may vary depending on your particular use case and the capabilities of the HeyGen API.
By following these steps, you should be able to create a green background video using HeyGen API.
Here is an example to create a green background avatar video:
curl -X POST 'https://api.heygen.com/v1/video.generate' \
-H 'X-Api-Key: <your-api-key>' \
-H 'Content-Type: application/json' \
-d '{
"background": "#008000",
"clips": [
{
"avatar_id": "Daisy-inskirt-20220818",
"input_text": "Welcome to HeyGen API",
"voice_id": "43eb6d3dc5294a119aa17ab1d60444d1"
}
],
"ratio": "16:9",
"test": true
}'
The response will look like this:
{
"code": 100,
"data": {
"video_id": "<video_id>"
},
"message": "Success"
}
Here is what the video looks like:
Updated about 2 months ago