1. Go to this page and download the library: Download vapi/vapi 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/ */
vapi / vapi example snippets
namespace Example;
use Vapi\VapiClient;
use Vapi\Types\CreateAssistantDto;
$client = new VapiClient(
token: '<token>',
);
$client->assistants->create(
new CreateAssistantDto([]),
);
The SDK defaults to the `Default_` environment. To use a different environment, pass it to the client constructor: