GPU Cloud Billing: From Usage Metering to Billing
In this blog, we take the next step toward a complete billing workflow—automatically transforming usage into billable cost using SKU-specific pricing.
Read Now
Cloud providers building GPU or Neo Cloud services face a universal challenge: how to turn resource consumption into revenue with accuracy, automation, and operational efficiency. In our previous blog, we demonstrated how to programmatically retrieve usage data from Rafay’s Usage Metering APIs and generate structured CSVs for downstream processing in an external billing platform.
In this follow-up blog, we take the next step toward a complete billing workflow—automatically transforming usage into billable cost using SKU-specific pricing. With GPU clouds scaling faster than ever and enterprise AI workloads becoming increasingly dynamic, providers must ensure their billing engine is consistent, transparent, and tightly integrated with their platform. The enhancements described in this blog are designed exactly for that.

When a customer launches a GPU VM, deploys a Slurm workload, or provisions an AI/ML environment, they expect metering and billing to just work. Fortunately, Rafay’s Usage Metering API gives providers a clean, structured view of usage—broken down by organization (i.e. tenant), profile (i.e. SKU), instance, and duration.
However, raw usage alone is not enough for billing teams. To generate invoices or chargeback reports, someone must:
Most organizations build a billing pipeline for this, but without automation, billing becomes brittle and error-prone. Manually joining usage data with a price book slows invoicing cycles and creates room for discrepancies.
For organizations that do not have a billing platform, we have enhanced our original utility to now calculate costs automatically, producing a CSV that is immediately ready for billing ingestion.
The ncp_metrics.py script is a Python utility that collects billing and usage metrics for compute and service instances from the Rafay Console API. It generates CSV reports containing detailed billing information including usage hours, billing rates, and calculated billing amounts for each instance.
requests - For making HTTP API callscsv - For CSV file operations (built-in)datetime - For date/time operations (built-in)This exercise assumes that you have access to an instance of the Rafay Platform (i.e. Controller). Ensure that you have Org Admin level access to the Default Org so that you can use the API Keys to programmatically retrieve the usage metering data.
The utility requires the following environment variables to be set:
export DAYS=30
export RAFAY_DEFAULT_API_KEY="your-default-api-key"
export PARTNER_API_KEY="your-partner-api-key"
export RAFAY_CONSOLE_URL="your_rafay_url"
export CURRENCY="USD"python ncp_metrics.pyThe utility generates two CSV files:
ncp-metrics-{timestamp}.csv: Raw metrics datancp-metrics-sorted-{timestamp}.csv: Sorted by organization nameExample filenames:
ncp-metrics-12092025-154146.csvncp-metrics-sorted-12092025-154146.csv
Notice the billing rate and billing amount columns.
GPU cloud providers are moving rapidly toward usage-based economics for both infrastructure (GPU VMs, MIG slices, Slurm clusters) and AI services (model hosting, fine-tuning, inference endpoints). To operate at scale, they require automated, transparent billing workflows.
By enhancing the usage metering utility to include SKU-based cost calculation, we’ve taken a major step toward enabling frictionless billing integration for cloud and enterprise providers. The pipeline is modular, extensible, and easy to adapt to your pricing model.

In this blog, we take the next step toward a complete billing workflow—automatically transforming usage into billable cost using SKU-specific pricing.
Read Now

The Rafay Partner Elevate Program is designed to empower our global ecosystem of partners from resellers and system integrators to managed service providers, to deliver cutting-edge AI, cloud, and Kubernetes outcomes faster and more profitably.
Read Now
.png)
This blog details the specific features of the Rafay Platform Version 4.0 Which Further Simplifies Kubernetes Management and Accelerates Cloud-Native Operations for Enterprises and Cloud Providers
Read Now