PHP code example of freedomtech-hosting / polydock-amazeeai-backend-client-php
1. Go to this page and download the library: Download freedomtech-hosting/polydock-amazeeai-backend-client-php 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/ */
freedomtech-hosting / polydock-amazeeai-backend-client-php example snippets
use FreedomtechHosting\PolydockAmazeeAIBackendClient\Client;
$baseUrl = 'https://api.amazee.ai';
$accessToken = 'your-access-token';
$client = new Client($baseUrl, $accessToken);
// Example: Get current user info
try {
$me = $client->getMe();
print_r($me);
} catch (\Exception $e) {
echo "Error: " . $e->getMessage();
}
$response = $client->login('[email protected]', 'password');
$token = $response['token']; // Depending on API response structure
// List all teams
$teams = $client->listTeams();
// Create a new team
$newTeam = $client->createTeam('My Team', '[email protected]');
// List Private AI keys
$keys = $client->listPrivateAIKeys();
// Create a new Private AI key
$client->createPrivateAIKeys($regionId, 'my-key-name');
$client = new Client($baseUrl, $accessToken, debug: true);