Discussions
Video length check
Is there an API I can call to with my script for a video to check how long the video is going to be before I submit a call to the API to make the video?
Realtime avatar session limit to one session even when using Business plan API key
Is this because real time avatars are still in preview or what can be done to get more sessions?
"Voice is expired" at line 1 error message
Hi,
Inquiry About Voice Generation API
I have reviewed the API documentation and would like to inquire about the availability of a voice generation API. If such an API does not currently exist, is it possible to develop one separately? This would enable us to create a broader range of related applications.
Create new session is not working
I've just create account and received my api key.
Why does my generated video still have a watermark even though I set "test": false in the request parameters?
Why does my generated video still have a watermark even though I set "test": false in the request parameters?
How to get uploaded assets link for generate from template
Hi, i am trying to replace my audio source and avatar from a template, but it seems like it doesn't accept assets_id i get from https://upload.heygen.com/v1/asset, i still can't find any method to get url from an uploaded assets,
✅✅✅ Help to generating the first version 2 video
<?php
$apiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==';
$client = new \GuzzleHttp\Client();
$response = $client->request('GET', 'https://api.heygen.com/v1/video_status.get', [
'headers' => [
'accept' => 'application/json',
'x-api-key' => $apiKey,
],
]);
echo $response->getBody();
$heygen = SpaEntity::name('AI VIDEO Hengen.com')
->get();
foreach ($heygen as $spa) {
print("\n");
print($spa->URL);
print("\n");
}
$templateId = '9843b64e0acb90ccb26fd358ae86b638'; // my face and voice
$url = 'https://api.heygen.com/v2/template/' . $templateId;
$headers = [
'Accept: application/json',
'x-api-key: '.$apiKey
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
if ($response === false) {
echo 'Curl error: ' . curl_error($ch);
}
curl_close($ch);
print("\n Getting the overview \n");
echo $response;
print("\n");
$data = [
"test" => true,
"caption" => true,
"title" => "new video ",
"variables" => [
"company" => [
"name" => "company",
"type" => "text",
"properties" => [
"content" => "Ole Oldhøj cleaning service"
]
],
"FirstName" => [
"name" => "company",
"type" => "text",
"properties" => [
"content" => "Ole"
]
]
]
];
$ch = curl_init('https://api.heygen.com/v2/template/' . $templateId . '/generate');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'X-Api-Key: ' . $apiKey,
'Content-Type: application/json'
]);
$response = curl_exec($ch);
curl_close($ch);
print("\n Getting the VIDEO\n");
echo $response ;
$responseObj = json_decode($response);
// Access the video_id property
$videoId = $responseObj->data->video_id;
$VIDEOURL = "https://app.heygen.com/videos/" . $videoId;
print("\n video url \n");
print($VIDEOURL);
print("\n video url \n");
Why does this payload work and this doesn't?
Hi,
wher to get "audio_asset_id" ?
Hi