get-billing
Retrieve time-bucketed RunPod spend history, aggregated or broken down by resource type. Use parameters to set date range, bucket size, and paginate through results.
Instructions
Get time-bucketed Runpod spend history, either aggregated across all resources or broken down by resource type (pods, serverless, endpoints, network volumes, clusters). v2-only — returns a 501 notice on the v1 API. Records are capped via limit/cursor; narrow the window with startTime/endTime or lastN.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lastN | No | Return the last N buckets of bucketSize, ending with the current one. Mutually exclusive with startTime/endTime. | |
| limit | No | Maximum number of items to return (default 20, max 100). Use the returned nextCursor to fetch the next page. | |
| scope | No | Which billing breakdown to fetch. "all" (default) is the aggregate across every resource. | |
| cursor | No | Opaque pagination cursor from a previous response (nextCursor). Omit to start from the beginning. | |
| endTime | No | End of the period (RFC 3339), exclusive. Defaults to now. Mutually exclusive with lastN. | |
| startTime | No | Start of the period (RFC 3339, e.g. 2026-05-01T00:00:00Z). Defaults to 30 days ago. Mutually exclusive with lastN. | |
| bucketSize | No | Length of each time bucket. Defaults to day. |