ByCloud Docs
GuidesCLIAPISDK

PHP SDK

Official PHP SDK for Laravel and other frameworks

Installation

composer require bycoded/bycloud-sdk

Quick Start

Here's a quick example to get you started with the PHP SDK:

<?php
use ByCloud\SDK\ByCloud;
// Initialize the client
$client = new ByCloud(["token" => "YOUR_ACCESS_TOKEN"]);
// List all instances
$instances = $client->compute->listInstances();
print_r($instances);
// Create a new instance
$newInstance = $client->compute->createInstance([
"name" => "my-instance",
"flavorId" => "c1.medium",
"imageId" => "ubuntu-22.04"
]);
print_r($newInstance);

Features

- Full coverage of the ByCloud API

- Automatic request signing and authentication

- Built-in error handling and retries

- Strongly typed responses