ByCloud Docs
GuidesCLIAPISDK

JavaScript SDK

Official JavaScript/TypeScript SDK for Node.js and browsers

Installation

npm install @bycoded/bycloud-sdk

Quick Start

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

import { ByCloud } from "@bycoded/bycloud-sdk";
// Initialize the client
const client = new ByCloud({
token: "YOUR_ACCESS_TOKEN",
});
// List all instances
const instances = await client.compute.listInstances();
console.log(instances);
// Create a new instance
const newInstance = await client.compute.createInstance({
name: "my-instance",
flavorId: "c1.medium",
imageId: "ubuntu-22.04",
});
console.log(newInstance);

Features

- Full coverage of the ByCloud API

- Automatic request signing and authentication

- Built-in error handling and retries

- Strongly typed responses