1. Go to this page and download the library: Download runapi-ai/infinitetalk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
runapi-ai / infinitetalk example snippets
unApi\Infinitetalk\InfinitetalkClient;
$client = new InfinitetalkClient(); // reads RUNAPI_API_KEY
$task = $client->audioToVideo->create([
'model' => 'infinitetalk-from-audio',
'prompt' => 'A precise product render on white marble',
'source_audio_url' => 'https://cdn.runapi.ai/public/samples/voice.mp3',
'source_image_url' => 'https://cdn.runapi.ai/public/samples/portrait.jpg',
]);
$status = $client->audioToVideo->get($task->id);
$result = $client->audioToVideo->run([
'model' => 'infinitetalk-from-audio',
'prompt' => 'A serene mountain lake at dawn',
'source_audio_url' => 'https://cdn.runapi.ai/public/samples/voice.mp3',
'source_image_url' => 'https://cdn.runapi.ai/public/samples/portrait.jpg',
]);
echo $result->videos[0]->url . PHP_EOL;
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.