API Documentation

Welcome to the Baraclouds API. This documentation covers all available endpoints and how to use them.

Introduction

The Baraclouds API is a RESTful API that allows you to programmatically manage your cloud resources. All requests should be made over HTTPS.

Authentication

All API requests require authentication using an API key. Include your API key in the X-API-Key header.

curl -X GET https://api.baraclouds.com/v1/status \
  -H "X-API-Key: YOUR_API_KEY"
You can generate API keys from your dashboard.

Base URL

https://api.baraclouds.com/v1

List Virtual Machines

GET /vms
Response
[
  {
    "id": "vm-123456",
    "name": "my-server",
    "instance_type": "t2.micro",
    "region": "us-east-1",
    "status": "running",
    "ip_address": "10.0.1.42",
    "created_at": "2026-03-10T10:30:00Z"
  }
]

Create Virtual Machine

POST /vms
Request Body
{
  "name": "my-server",
  "instance_type": "t2.micro",
  "region": "us-east-1",
  "tags": "web,production"
}
Response
{
  "message": "VM created successfully",
  "vm_id": "vm-123456",
  "ip_address": "10.0.1.42"
}

Start Virtual Machine

POST /vms/{vm_id}/start
Response
{
  "message": "VM starting",
  "vm_id": "vm-123456",
  "status": "starting"
}

Stop Virtual Machine

POST /vms/{vm_id}/stop
Response
{
  "message": "VM stopped",
  "vm_id": "vm-123456"
}

Delete Virtual Machine

DELETE /vms/{vm_id}
Response
{
  "message": "VM deleted successfully"
}

Add Credits

POST /billing/credits
Request Body
{
  "amount": 50,
  "payment_method": "credit_card"
}
Response
{
  "message": "Credits added successfully",
  "new_balance": 150.00
}

Billing History

GET /billing/history
Response
[
  {
    "id": 1,
    "amount": 50.00,
    "description": "Credit purchase",
    "status": "completed",
    "timestamp": "2026-03-10T10:30:00Z"
  }
]

Instance Types

Type vCPU RAM Storage Price/Hour
t2.micro11 GB30 GB$0.0116
t2.small12 GB50 GB$0.023
t2.medium24 GB100 GB$0.0464
c5.large24 GB200 GB$0.085
c5.xlarge48 GB400 GB$0.17
r5.large216 GB500 GB$0.126
p3.2xlarge864 GB1 TB$3.06