---
title: "Serverless billing history"
method: GET
path: "/billing/endpoints"
tags: ["billing"]
---

# Serverless billing history

`GET /billing/endpoints`

Retrieve billing information about your Serverless endpoints. Review request parameters, response fields, and errors for this Runpod API operation.

## Query parameters

- `bucketSize` 'hour' | 'day' | 'week' | 'month' | 'year' — The length of each billing time bucket. The billing time bucket is the time range over which each billing record is aggregated.
- `dataCenterId` string[] — Filter to endpoints located in any of the provided Runpod data centers. The data center IDs are listed in the response of the /pods endpoint.
- `endpointId` string — Filter to a specific endpoint.
- `endTime` string, date-time — The end date of the billing period to retrieve.
- `gpuTypeId` string[] — Filter to endpoints with the provided GPU type attached.
- `grouping` 'endpointId' | 'podId' | 'gpuTypeId' — Group the billing records by the provided field.
- `imageName` string — Filter to endpoints created with the provided image.
- `startTime` string, date-time — The start date of the billing period to retrieve.
- `templateId` string — Filter to endpoints created from the provided template.

## Response `200`

Successful operation.

- object[]
  - `amount` number — The amount charged for the group for the billing period, in USD.
  - `diskSpaceBilledGb` integer — The amount of disk space billed for the billing period, in gigabytes (GB). Does not apply to all resource types.
  - `endpointId` string — If grouping by endpoint ID, the endpoint ID of the group.
  - `gpuTypeId` string — If grouping by GPU type ID, the GPU type ID of the group.
  - `podId` string — If grouping by Pod ID, the Pod ID of the group.
  - `time` string, date-time — The start of the period for which the billing record applies.
  - `timeBilledMs` integer — The total time billed for the billing period, in milliseconds. Does not apply to all resource types.

---

[API](https://skmtc.dev/runpod/apis/runpod-rest-api.md) · [All operations](https://skmtc.dev/runpod/apis/runpod-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/runpod/runpod-rest-api/revisions/504cd0394ed6/schema)
