Skip to the content.

Billing

Module: services/billing · Image: nebius-mocker-billing · NEBIUS_MOCKER_SERVICES=billing Tier: T1 pricing policy, spot prices, calculator (v1, v1alpha1) · one-time export not yet · Endpoints: pricing-policies.billing-cpl, api.calculator.billing-data-plane, api.billing-report-exporter.billing-data-plane

Implementation status

Piece Status
nebius.billing.v1.PricingPolicyService: Create, Get, GetByName, List (paged), Update (reset mask, partial CLI updates, resource_version), Delete ✅ T1
Pricing-policy rules: project parent, name of Latin letters and digits, platform with a spot market in the project’s region (and offered there for preemptibles, checked against compute’s catalog through peer.ComputePlatforms), max_price decimal with ≤ 3 places inside the platform’s range (OUT_OF_RANGE otherwise), immutable compute_instance_spec ✅
Pricing-policy status: state (CREATING → ACTIVE, UPDATING → ACTIVE on a price change, DELETING), sku_id, currency, scheduling_state (BLOCKED while max_price < spot price, computed on every read), running_vm_count (counted by compute on every read) ✅
nebius.billing.v1alpha1.SpotPriceService: List (paged), ListSeries (filters, 15-minute / 1-hour steps, first/last/avg), no authentication needed ✅
nebius.billing.v1alpha1.CalculatorService: Estimate, EstimateBatch (compute instances, disks, filesystems; create and update specs) ✅
nebius.billing.v1.CalculatorService: EstimateBatch (Any specs of the compute create/update requests, SKU breakdown, currency, filter_aggregation_unit) ✅
Price list (built-in prices.yaml, NEBIUS_MOCKER_BILLING_PRICES_FILE) ✅
Authorization: billing.pricingPolicies.* on the project (viewer reads, editor manages); calculator for any authenticated caller; spot prices public ✅
nebius_billing_v1_pricing_policy resource and data source with the official provider ✅ e2e: test/terraform/billing
nebius billing pricing-policy, nebius billing v1alpha1 spot-price, nebius billing v1alpha1 calculator CLI flows from the docs ✅ e2e: test/cli/billing
nebius.billing.v1alpha1.OneTimeExportService (Create, Get, List) Not yet: UNIMPLEMENTED
Compute instances priced by a policy (spec.spot_pricing_policy): validated by compute through peer.PricingPolicies, counted in running_vm_count through peer.PricingPolicyVMs, BLOCKED policies keep VMs from starting ✅ (see compute.md, Pricing model) · contract test/contract/compute_instance_spot_test.go, e2e test/terraform/compute/spot_pricing_test.go, CLI test/computeinstance/spot_e2e_test.go
mk8s node groups priced by a policy (spec.template.spot_pricing_policy) Not yet: rejected by name in mk8s
A moving spot market Not yet
Quota on pricing policies per tenant Not yet (owned by the quotas area)

Verified against: nebius/api@4522189, terraform-provider-nebius v0.6.91, gosdk v0.2.100, nebius CLI 0.12.312.

Covered by unit tests (services/billing/{domain,dal,api}), gosdk contract tests (test/contract/billing_*), the Terraform e2e suite and the CLI e2e suite (make e2e).

Behavior notes

These follow the pricing-policy docs, managing policies, spot prices and the protos. Where neither says what happens, the mock’s choice is marked (mock).

Price list

services/billing/domain/prices.yaml is the built-in price list. NEBIUS_MOCKER_BILLING_PRICES_FILE replaces it with a file of the same shape (YAML or JSON). The prices are illustrative, not Nebius’ real prices:

currency: usd
compute:
  - platform: gpu-h100-sxm
    product_title: "NVIDIA® H100 NVLink"
    gpu_hour: "2.95"            # per GPU-hour; non-GPU platforms set vcpu_hour and memory_gib_hour
    preemptible:                # the platform's spot market
      product_title: "Preemptible NVIDIA® H100 NVLink"
      min_price: "0.500"        # pricing-policy max_price bounds (OUT_OF_RANGE outside)
      max_price: "50.000"
      spot: { eu-north1: "1.250" }   # current spot price per GPU-hour, per region
disks:
  NETWORK_SSD: { product_title: "Network SSD disk", gib_hour: "0.0000986" }
filesystems:
  NETWORK_SSD: { product_title: "Network SSD shared filesystem", gib_hour: "0.0001111" }

SKU IDs are derived from the platform and type names, so they stay the same across restarts. Spot prices for regions the mocker doesn’t emulate (NEBIUS_MOCKER_REGIONS) are ignored.

Not yet

Overview

Emulation design

Terraform

Kind Terraform type Service RPCs called Tier
Resource nebius_billing_v1_pricing_policy nebius.billing.v1.PricingPolicyService Create, Get, GetByName, Update, Delete + OperationService.Get T1
Data source nebius_billing_v1_pricing_policy nebius.billing.v1.PricingPolicyService Get, GetByName T1

API surface

nebius.billing.v1.CalculatorService

Endpoint: api.calculator.billing-data-plane.api.nebius.cloud:443 · Proto: nebius/billing/v1/calculator_service.proto

RPC Request Response TF
EstimateBatch EstimateBatchRequest EstimateBatchResponse  

nebius.billing.v1.PricingPolicyService

Endpoint: pricing-policies.billing-cpl.api.nebius.cloud:443 · Proto: nebius/billing/v1/pricing_policy_service.proto · used by Terraform

RPC Request Response TF
Create CreatePricingPolicyRequest common.v1.Operation ✅
Get GetPricingPolicyRequest PricingPolicy ✅
GetByName common.v1.GetByNameRequest PricingPolicy ✅
List ListPricingPoliciesRequest ListPricingPoliciesResponse  
Update UpdatePricingPolicyRequest common.v1.Operation ✅
Delete DeletePricingPolicyRequest common.v1.Operation ✅

nebius.billing.v1alpha1.CalculatorService

Endpoint: api.calculator.billing-data-plane.api.nebius.cloud:443 · Proto: nebius/billing/v1alpha1/calculator_service.proto

RPC Request Response TF
Estimate EstimateRequest EstimateResponse  
EstimateBatch EstimateBatchRequest EstimateBatchResponse  

nebius.billing.v1alpha1.OneTimeExportService

Endpoint: api.billing-report-exporter.billing-data-plane.api.nebius.cloud:443 · Proto: nebius/billing/v1alpha1/one_time_export_service.proto

RPC Request Response TF
Create CreateOneTimeExportRequest common.v1.Operation  
Get GetOneTimeExportRequest OneTimeExport  
List ListOneTimeExportsRequest ListOneTimeExportsResponse  

nebius.billing.v1alpha1.SpotPriceService

Endpoint: pricing-policies.billing-cpl.api.nebius.cloud:443 · Proto: nebius/billing/v1alpha1/spot_price_service.proto

RPC Request Response TF
List ListSpotPricesRequest ListSpotPricesResponse  
ListSeries ListSpotPriceSeriesRequest ListSpotPriceSeriesResponse