Skip to content
Docs

Estimate Volume Create Cost

POST/v1/compute/volumes/cost

Return a priced cost quote for the proposed Volume.

Body ParametersJSONExpand Collapse
name: string

Name of the Volume.

project_id: string

Project ID the Volume belongs to.

region: RegionName

Region the resource is in.

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.

vm_id: optional string

ID of the VM the Volume is attached to.

ReturnsExpand Collapse
CostQuote object { currency, monthly_total, priced_at, usage_dimensions }

Cost quote returned by POST /cost.

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

Estimate Volume Create Cost

curl https://api.nirvanalabs.io/v1/compute/volumes/cost \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \
    -d '{
          "name": "my-data-volume",
          "project_id": "123e4567-e89b-12d3-a456-426614174000",
          "region": "us-sva-2",
          "size": 100,
          "type": "abs",
          "tags": [
            "production",
            "ethereum"
          ],
          "vm_id": "123e4567-e89b-12d3-a456-426614174000"
        }'
{
  "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"
    }
  ]
}
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"
    }
  ]
}