Platform Overview

FastVM exposes a small authenticated REST API for creating VMs, taking snapshots, restoring from snapshots, opening the serial console, and managing organization API keys.

Base URL: http://localhost:8090

Authentication

Every user-facing endpoint accepts either an API key or a Better Auth JWT.

MethodHeader
API keyX-API-Key: hlm_...
JWTAuthorization: Bearer <jwt>

Common Flows

Create a VM

bash
curl -X POST "http://localhost:8090/v1/vms" \
  -H "X-API-Key: hlm_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "build-worker",
    "machineType": "c1m2",
    "diskGiB": 20
  }'

Snapshot a VM

bash
curl -X POST "http://localhost:8090/v1/snapshots" \
  -H "X-API-Key: hlm_..." \
  -H "Content-Type: application/json" \
  -d '{
    "vmId": "<vm-id>",
    "name": "before-upgrade"
  }'

Restore from a snapshot

bash
curl -X POST "http://localhost:8090/v1/vms" \
  -H "X-API-Key: hlm_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "restored-worker",
    "snapshotId": "<snapshot-id>"
  }'

Run a command in a VM

bash
curl -X POST "http://localhost:8090/v1/vms/<vm-id>/exec" \
  -H "X-API-Key: hlm_..." \
  -H "Content-Type: application/json" \
  -d '{
    "command": "uname -a",
    "timeoutSec": 10
  }'

Notes

  • Mutating endpoints accept an optional Idempotency-Key header.
  • VM creation can start from a machine type or a snapshot, but not both.
  • Snapshot creation and restore are regular request/response operations. The UI refreshes resource state through the existing REST endpoints.
  • The full OpenAPI document is available at /openapi.yaml.