Skip to content
DocsOpenAPI spec

    Estimate Agent Sandbox Create Cost

    POST/v1/sandbox_vms/cost

    Return a priced cost quote for the proposed Agent Sandbox while it runs. A paused or powered-off Agent Sandbox is billed for its disk only.

    Body ParametersJSONExpand Collapse
    name: string

    Name of the Agent Sandbox. Unique within its project.

    project_id: string

    ID of the project to create the Agent Sandbox in.

    region: RegionName

    Region the resource is in.

    One of the following:
    "us-sva-2"
    "us-wdc-1"
    instance_type: optional string

    Instance type of the Agent Sandbox. Defaults to n1-highcpu-2 (2 vCPU, 4 GiB), the only size available.

    tags: optional array of string

    Tags to attach to the Agent Sandbox.

    vpc_id: optional string

    ID of the VPC to place the Agent Sandbox in. It must be a ready VPC in the Agent Sandbox’s project and region. Omit it to use the project’s oldest ready VPC in the region, or a new VPC when there is none.

    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, 4 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
    promotional_credits: array of object { amount, kind, status }

    Credits the organization earns automatically through the startup credits program, one per step. Empty when the organization is not part of the program.

    amount: string

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

    formatdecimal
    kind: "organization_created" or "payment_method_added"

    Step that earns the credit: creating the organization, or saving a payment method on it.

    One of the following:
    "organization_created"
    "payment_method_added"
    status: "available" or "pending" or "granted"

    Whether the credit can still be earned (“available”), was earned and is being issued (“pending”), or was issued (“granted”). A granted credit reaches the balance shortly after it is issued.

    One of the following:
    "available"
    "pending"
    "granted"
    recharge_threshold_days: 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, 4 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
    promotional_credits: array of object { amount, kind, status }

    Credits the organization earns automatically through the startup credits program, one per step. Empty when the organization is not part of the program.

    amount: string

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

    formatdecimal
    kind: "organization_created" or "payment_method_added"

    Step that earns the credit: creating the organization, or saving a payment method on it.

    One of the following:
    "organization_created"
    "payment_method_added"
    status: "available" or "pending" or "granted"

    Whether the credit can still be earned (“available”), was earned and is being issued (“pending”), or was issued (“granted”). A granted credit reaches the balance shortly after it is issued.

    One of the following:
    "available"
    "pending"
    "granted"
    recharge_threshold_days: 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 Agent Sandbox Create Cost

    curl https://api.nirvanalabs.io/v1/sandbox_vms/cost \
        -H 'Content-Type: application/json' \
        -H "Authorization: Bearer $NIRVANA_LABS_API_KEY" \
        -d '{
              "name": "my-sandboxes",
              "project_id": "123e4567-e89b-12d3-a456-426614174000",
              "region": "us-sva-2",
              "instance_type": "n1-highcpu-2",
              "tags": [
                "production",
                "agents"
              ],
              "vpc_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"
        }
      ],
      "current_summary": {
        "daily_cost": "-69125",
        "effective_balance": "-69125",
        "monthly_cost": "-69125",
        "promotional_credits": [
          {
            "amount": "-69125",
            "kind": "payment_method_added",
            "status": "available"
          }
        ],
        "recharge_threshold_days": "-69125",
        "estimated_next_charge_at": "2025-01-01T00:00:00Z",
        "runway_months": "-69125"
      },
      "updated_summary": {
        "daily_cost": "-69125",
        "effective_balance": "-69125",
        "monthly_cost": "-69125",
        "promotional_credits": [
          {
            "amount": "-69125",
            "kind": "payment_method_added",
            "status": "available"
          }
        ],
        "recharge_threshold_days": "-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",
        "promotional_credits": [
          {
            "amount": "-69125",
            "kind": "payment_method_added",
            "status": "available"
          }
        ],
        "recharge_threshold_days": "-69125",
        "estimated_next_charge_at": "2025-01-01T00:00:00Z",
        "runway_months": "-69125"
      },
      "updated_summary": {
        "daily_cost": "-69125",
        "effective_balance": "-69125",
        "monthly_cost": "-69125",
        "promotional_credits": [
          {
            "amount": "-69125",
            "kind": "payment_method_added",
            "status": "available"
          }
        ],
        "recharge_threshold_days": "-69125",
        "estimated_next_charge_at": "2025-01-01T00:00:00Z",
        "runway_months": "-69125"
      }
    }