Virtual Machines

Create VM

POST /v2/vms

Request Body:

{
  "vmTypeId": 1,
  "region": "us-east-1",
  "name": "my-vm",
  "isSpot": 0,
  "volumeMountPaths": {
    "123": "/mnt/data",
    "456": "/mnt/models"
  }
}
FIELD
TYPE
REQUIRED
DESCRIPTION

vmTypeId

integer

Yes

VM type ID

region

string

Yes

Region code (e.g., "us-east-1")

name

string

Yes

VM display name

isSpot

integer

No

0=on-demand, 1=spot (default: 0)

volumeMountPaths

map

No

Volume ID to mount path mapping

Response:

{
  "message": "success",
  "code": 10000,
  "data": {
    "id": 456,
    "name": "my-vm",
    "status": "running",
    "gpuDisplayName": "NVIDIA RTX A4000",
    "ipAddress": "192.168.1.100",
    "cpuCores": 8,
    "memoryInGb": "32",
    "gpuCount": 1,
    "gpuMemoryInGb": "16",
    "region": "us-east-1",
    "storageInGb": "100",
    "sshTemplate": "ssh [email protected]",
    "createdAt": "2024-01-15T10:30:00Z",
    "isSpot": 0
  }
}

Get VM by ID

Response: Same as create

List VMs (Paginated)

Query Parameters:

PARAMETER
TYPE
DEFAULT
DESCRIPTION

page

long

1

Page number (1-based)

size

long

10

Page size

status

string

-

Filter by status (e.g., "running")

Response:

Update VM (Rename)

Request Body:

Terminate VM

Response:

Get VM Types

Returns all available GPU types and their availability by region. Required for creating VMs - the vmTypeId in create request comes from this list.

Response:

Last updated

Was this helpful?