v1

latestOpenAPI 3.1.02026-07-2676123203.9 KB
billing

Serverless billing history

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

get/billing/endpoints

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.

dataCenterIdstring[]

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.

[
  "EU-RO-1",
  "CA-MTL-1"
]
endpointIdstring

Filter to a specific endpoint.

Example:jpnw0v75y3qoql
endTimestring date-time

The end date of the billing period to retrieve.

Example:2023-01-31T23:59:59Z
gpuTypeIdstring[]

Filter to endpoints with the provided GPU type attached.

grouping'endpointId' | 'podId' | 'gpuTypeId'

Group the billing records by the provided field.

imageNamestring

Filter to endpoints created with the provided image.

Example:runpod/pytorch:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04
startTimestring date-time

The start date of the billing period to retrieve.

Example:2023-01-01T00:00:00Z
templateIdstring

Filter to endpoints created from the provided template.

Example:30zmvf89kd

Response

Successful operation.

amountnumber

The amount charged for the group for the billing period, in USD.

diskSpaceBilledGbinteger

The amount of disk space billed for the billing period, in gigabytes (GB). Does not apply to all resource types.

endpointIdstring

If grouping by endpoint ID, the endpoint ID of the group.

gpuTypeIdstring

If grouping by GPU type ID, the GPU type ID of the group.

podIdstring

If grouping by Pod ID, the Pod ID of the group.

timestring date-time

The start of the period for which the billing record applies.

timeBilledMsinteger

The total time billed for the billing period, in milliseconds. Does not apply to all resource types.

Example response

[
  {
    "amount": 100.5,
    "diskSpaceBilledGb": 50,
    "time": "2023-01-01T00:00:00Z",
    "timeBilledMs": 3600000
  }
]