Skip to content

Disks, Volumes & Pricing API ​

Endpoints for persistent disks, workspace volumes, and pricing.

Workspace endpoints live under /api/workspaces/{slug} and use the same authentication as the rest of the API; see Authentication. Read endpoints are available to any workspace member; changes require a workspace admin.

Objects ​

Volume ​

One persistent disk, owned by a project, template, managed database, or cloud desktop.

FieldTypeDescription
idstringVolume ID
workspace_idstringOwning workspace
workload_typestringproject, template, database, or desktop
workload_idstringID of the owning workload
workload_namestringName of the owning workload
pvc_namestringUnderlying Kubernetes PVC name
namespacestringKubernetes namespace
size_gibintegerProvisioned size in GiB (billed size)
mount_pathstringMount path inside the container
storage_classstringStorage class
statusstringprovisioning, bound, resizing, failed, or released
last_errorstringLast provisioning or resize error, if any
billing_starts_atstring (RFC 3339)When storage billing started
released_atstring | nullWhen the disk was deleted and billing ended
created_at / updated_atstring (RFC 3339)Timestamps
monthly_cost_usdnumberCost of the current size per 730-hour month
hourly_cost_usdnumberCost of the current size per hour

StoragePricing ​

FieldTypeDescription
usd_per_gib_monthnumberPrice per GiB per month
hours_per_monthintegerHours in a billing month (730)
min_size_gibintegerSmallest allowed disk (1)
max_size_gibintegerLargest allowed disk (1000)
versionstringPricing version recorded on usage
enabledbooleanWhether storage is currently charged

Volumes ​

List Volumes ​

All disks in the workspace (projects, templates, databases, and cloud desktops).

http
GET /api/workspaces/{slug}/volumes

Response:

jsonc
{
  "volumes": [ /* Volume */ ],
  "pricing": { /* StoragePricing */ }
}

Resize Volume ​

Grow a disk. Requires admin.

http
PATCH /api/workspaces/{slug}/volumes/{volume_id}

Body:

json
{ "size_gib": 30 }

Response: { "volume": Volume }

Sizes are grow-only. A smaller size_gib returns 400 with guidance on migrating data to a new, smaller disk. Growing a disk on an empty wallet returns 403. A cloud desktop's home disk can be grown only once it has bound (409 before the desktop first starts) and up to the platform's desktop disk limit (400 above it).

Project Disk ​

Get Project Disk ​

http
GET /api/workspaces/{slug}/projects/{project_slug}/disk

Response:

jsonc
{
  "disk": null,
  "pricing": { /* StoragePricing */ }
}

disk is a Volume, or null when the project is stateless.

Create or Update Project Disk ​

Opt a project into a disk, grow it, or change its mount path. Requires admin.

http
PUT /api/workspaces/{slug}/projects/{project_slug}/disk

Body:

json
{ "size_gib": 10, "mount_path": "/data" }

Response:

jsonc
{
  "disk": { /* Volume */ },
  "redeploy_required": true
}

The change applies on the next deploy. Size and mount path rules are listed in Persistent Disks. Shrinking is rejected.

Delete Project Disk ​

Delete the disk and all its data, and stop storage billing. Requires admin.

http
DELETE /api/workspaces/{slug}/projects/{project_slug}/disk?confirm={project_slug}

The confirm query parameter must equal the project slug. Returns 409 while the project has a running deployment; stop it first.

Response: { "message": "..." }

Create Project with a Disk ​

POST /api/workspaces/{slug}/projects accepts an optional disk object:

json
{
  "name": "my-app",
  "disk": { "size_gib": 10, "mount_path": "/data" }
}

Omit disk to create a stateless project.

Pricing ​

Get Pricing ​

Public: send the request without an API key or session. It returns the CPU and RAM hourly rates by wallet balance band, lowest band first (min_balance_usd is the balance from which a band applies), and the persistent storage tariff.

http
GET /api/pricing

Response:

json
{
  "compute": {
    "tiers": [
      { "min_balance_usd": 0, "cpu_usd_per_hour": 0.02, "ram_gb_usd_per_hour": 0.01 },
      { "min_balance_usd": 100, "cpu_usd_per_hour": 0.014, "ram_gb_usd_per_hour": 0.007 },
      { "min_balance_usd": 200, "cpu_usd_per_hour": 0.012, "ram_gb_usd_per_hour": 0.006 }
    ]
  },
  "storage": {
    "usd_per_gib_month": 0.15,
    "hours_per_month": 730,
    "min_size_gib": 1,
    "max_size_gib": 1000,
    "version": "...",
    "enabled": true
  }
}

Usage Records ​

GET /api/workspaces/{slug}/wallet/usage returns hourly usage records. Each record includes:

FieldTypeDescription
kindstringcompute or storage
volume_idstring | nullVolume billed, for storage records
storage_gibintegerBilled disk size, for storage records
cost_nano_usdintegerExact storage cost in billionths of a dollar

For storage records, cost_nano_usd is the exact amount; sub-cent remainders are carried forward on the wallet and deducted once they reach a whole cent. cost_usd (cents) carries the compute cost.

Released under the ISC License.