Skip to content
Docs

Estimate VM Create Cost

POST/v1/compute/vms/cost

Return a priced cost quote for the proposed VM.

Body ParametersJSONExpand Collapse
boot_volume: object { size, type, tags }

Boot volume for the VM.

size: number

Size of the Volume in GB.

Type of the Volume.

One of the following:
"nvme"
"abs"
tags: optional array of string

Tags to attach to the Volume.

instance_type: string

Instance type name.

name: string

Name of the VM.

os_image_name: string

Name of the OS Image to use for the VM.

project_id: string

Project ID to create the VM in.

public_ip_enabled: boolean

Whether to enable public IP for the VM.

region: RegionName

Region the resource is in.

ssh_key: SSHKeyRequest { public_key }

Public SSH key configuration for the VM.

public_key: string

Public key to and use to access the VM.

subnet_id: string

ID of the subnet to use for the VM.

data_volumes: optional array of object { name, size, type, tags }

Data volumes for the VM.

name: string

Name of the Volume.

size: number

Size of the Volume in GB.

Type of the Volume.

One of the following:
"nvme"
"abs"
tags: optional array of string

Tags to attach to the Volume.

tags: optional array of string

Tags to attach to the VM.

ReturnsExpand Collapse
CostQuote object { currency, monthly_total, priced_at, 3 more }

Cost quote returned by POST /cost. current_summary and updated_summary hold the org billing summary now and with this resource; omitted when the caller cannot view billing.

currency: string

Currency the quote is denominated in. Always “USD” in v1.

monthly_total: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
priced_at: string

Timestamp the quote was priced at.

formatdate-time
usage_dimensions: array of object { dimension, dimension_display_name, monthly_amount, 2 more }

Priced rows, one per usage dimension emitted by the resource.

dimension: string

Usage dimension being priced (e.g. compute_vcpu, storage_abs_gb).

dimension_display_name: string

User-facing label for the dimension (e.g. “vCPU (hours)”).

monthly_amount: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
quantity: number

Quantity of the dimension being priced.

unit_price: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
current_summary: optional OrganizationBillingSummary { daily_cost, effective_balance, monthly_cost, 3 more }

Forward-looking billing summary for an organization. All costs are run-rate projections from the organization’s current active usage (”≈ $X/mo at current usage”).

daily_cost: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
effective_balance: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
monthly_cost: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
recharge_threshold_fraction: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
estimated_next_charge_at: optional string

Projected date the balance reaches the recharge threshold at the current run-rate. Null when there is no active usage (never charges).

formatdate-time
runway_months: optional string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
updated_summary: optional OrganizationBillingSummary { daily_cost, effective_balance, monthly_cost, 3 more }

Forward-looking billing summary for an organization. All costs are run-rate projections from the organization’s current active usage (”≈ $X/mo at current usage”).

daily_cost: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
effective_balance: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
monthly_cost: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
recharge_threshold_fraction: string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
estimated_next_charge_at: optional string

Projected date the balance reaches the recharge threshold at the current run-rate. Null when there is no active usage (never charges).

formatdate-time
runway_months: optional string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal

Estimate VM Create Cost

curl https://api.nirvanalabs.io/v1/compute/vms/cost \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \
    -d '{
          "boot_volume": {
            "size": 100,
            "type": "abs"
          },
          "instance_type": "n1-standard-8",
          "name": "my-vm",
          "os_image_name": "ubuntu-noble-2026-05-18",
          "project_id": "123e4567-e89b-12d3-a456-426614174000",
          "public_ip_enabled": true,
          "region": "us-sva-2",
          "ssh_key": {
            "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDBIASkmwNiLcdlW6927Zjt1Hf7Kw/PpEZ4Zm+wU9wn2"
          },
          "subnet_id": "123e4567-e89b-12d3-a456-426614174000",
          "tags": [
            "production",
            "ethereum"
          ]
        }'
{
  "currency": "USD",
  "monthly_total": "-69125",
  "priced_at": "2025-01-01T00:00:00Z",
  "usage_dimensions": [
    {
      "dimension": "compute_vcpu",
      "dimension_display_name": "vCPU (hours)",
      "monthly_amount": "-69125",
      "quantity": 4,
      "unit_price": "-69125"
    }
  ],
  "current_summary": {
    "daily_cost": "-69125",
    "effective_balance": "-69125",
    "monthly_cost": "-69125",
    "recharge_threshold_fraction": "-69125",
    "estimated_next_charge_at": "2025-01-01T00:00:00Z",
    "runway_months": "-69125"
  },
  "updated_summary": {
    "daily_cost": "-69125",
    "effective_balance": "-69125",
    "monthly_cost": "-69125",
    "recharge_threshold_fraction": "-69125",
    "estimated_next_charge_at": "2025-01-01T00:00:00Z",
    "runway_months": "-69125"
  }
}
Returns Examples
{
  "currency": "USD",
  "monthly_total": "-69125",
  "priced_at": "2025-01-01T00:00:00Z",
  "usage_dimensions": [
    {
      "dimension": "compute_vcpu",
      "dimension_display_name": "vCPU (hours)",
      "monthly_amount": "-69125",
      "quantity": 4,
      "unit_price": "-69125"
    }
  ],
  "current_summary": {
    "daily_cost": "-69125",
    "effective_balance": "-69125",
    "monthly_cost": "-69125",
    "recharge_threshold_fraction": "-69125",
    "estimated_next_charge_at": "2025-01-01T00:00:00Z",
    "runway_months": "-69125"
  },
  "updated_summary": {
    "daily_cost": "-69125",
    "effective_balance": "-69125",
    "monthly_cost": "-69125",
    "recharge_threshold_fraction": "-69125",
    "estimated_next_charge_at": "2025-01-01T00:00:00Z",
    "runway_months": "-69125"
  }
}