The Freedom Tech amazee.ai Private AI PHP library provides a simple, object-oriented interface to interact with the amazee.ai backend API.
Install the library via Composer:
composer require freedomtech-hosting/polydock-amazeeai-backend-client-php- PHP 8.2 or higher
ext-curlextensionext-jsonextension
To get started, instantiate the Client with your API base URL and an optional access token.
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();
}If you don't have a token yet, you can login to receive one:
$response = $client->login('user@example.com', 'password');
$token = $response['token']; // Depending on API response structure// List all teams
$teams = $client->listTeams();
// Create a new team
$newTeam = $client->createTeam('My Team', 'admin@example.com');// List Private AI keys
$keys = $client->listPrivateAIKeys();
// Create a new Private AI key
$client->createPrivateAIKeys($regionId, 'my-key-name');- Authentication: Login, Register, Logout, and Token management.
- User Management: Search, Create, Update, and Delete users.
- Team Management: Manage teams and user assignments.
- Private AI Keys: Manage your private AI keys and tokens.
- Region Management: List and manage regions (Admin).
- Audit Logs: Access system audit logs.
- Health Check: Monitor API health status.
Enable debug mode to see detailed request/response information in the console:
$client = new Client($baseUrl, $accessToken, debug: true);This library is licensed under the MIT License. See the LICENSE file for details.