Replace Video In Template
Example
Replace Video in Template
Template video:
add050630b74443fb9541965307b6083
URL: https://app.heygen.com/share/b2aebbb831884983ace89aa4175fa7e7
Variables:
{
"code": 100,
"data": {
"scenes": [
{
"variables": [
{
"name": "video_0",
"properties": [
{
"default": "https://surreal-product.s3.amazonaws.com/prod/movio/preset/video/origin/d9831b49b2ed4f5a8cad812f66bf4cb9.mp4?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAWTIFNQS3KRF4QRED%2F20220928%2Fus-east-2%2Fs3%2Faws4_request&X-Amz-Date=20220928T100921Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=146601581ea23f17288a188c6c1d4428cde665eda057e3a544be1aef30b6ba07",
"name": "link"
},
{
"default": "loop",
"name": "loop_style"
}
],
"type": "video"
}
]
}
],
"template_id": "b2aebbb831884983ace89aa4175fa7e7",
"video_id": "b2aebbb831884983ace89aa4175fa7e7"
},
"message": "Success"
}
template generate req:(curl)
curl --location --request POST 'https://api.heygen.com/v1/template.generate' \
--header 'x-api-key: O/rgPJbuWtusgyBOfYBHytyIuL2DeGowXB7rTBwLpxY=' \
--header 'Content-Type: application/json' \
--data-raw '{
"template_id": "b2aebbb831884983ace89aa4175fa7e7",
"title": "test sub video",
"test":true,
"variables": [
{
"properties": {
"link": "https://surreal-public.s3.us-east-2.amazonaws.com/demo_video/0.mp4",
"loop_style": "fit"
},
"name": "video_0"
}
]
}'
Result:
video_id : 73a28feb3c19466f87e2bf4a6f5d0009
URL:
https://app.heygen.com/share/73a28feb3c19466f87e2bf4a6f5d0009
Updated about 2 months ago