> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runpod.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Instant Cluster billing history

> Returns Instant Cluster billing history for the authenticated user, split into time buckets by startTime/endTime with bucketSize or by lastN recent buckets. Use clusterId to filter to one cluster; without it, records are emitted per cluster per bucket. Each record includes GPU compute, disk, inter-node networking, and total amounts. Instant Clusters are GPU-only, so no CPU cost component is returned.




## OpenAPI

````yaml get /v2/billing/clusters
openapi: 3.1.0
info:
  title: Runpod REST API
  version: 2.0.0
  description: Runpod public REST API — v2
servers:
  - url: https://api.runpod.io
    description: Runpod API v2 production server
security:
  - bearerAuth: []
tags:
  - name: Pods
    description: GPU and CPU pod lifecycle, configuration, actions, and log streaming.
  - name: Serverless
    description: >-
      Serverless endpoint lifecycle, worker visibility, releases, and worker log
      streaming.
  - name: Templates
    description: Reusable pod and endpoint configuration templates.
  - name: Network Volumes
    description: Persistent network storage volumes for workloads.
  - name: Registries
    description: Container registry credentials used to pull private images.
  - name: Catalog
    description: Available GPU, CPU, and data center catalog metadata.
  - name: Billing
    description: Billing history and usage cost records across resource types.
paths:
  /v2/billing/clusters:
    get:
      tags:
        - Billing
      summary: Get Instant Cluster billing history
      description: >
        Returns Instant Cluster billing history for the authenticated user,
        split into time buckets by startTime/endTime with bucketSize or by lastN
        recent buckets. Use clusterId to filter to one cluster; without it,
        records are emitted per cluster per bucket. Each record includes GPU
        compute, disk, inter-node networking, and total amounts. Instant
        Clusters are GPU-only, so no CPU cost component is returned.
      operationId: listClusterBilling
      parameters:
        - $ref: '#/components/parameters/BillingStartTime'
        - $ref: '#/components/parameters/BillingEndTime'
        - $ref: '#/components/parameters/BillingBucketSize'
        - $ref: '#/components/parameters/BillingLastN'
        - name: clusterId
          in: query
          required: false
          description: Filter to a specific Instant Cluster.
          schema:
            type: string
          example: cluster_abc123
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListClusterBillingResponse'
              examples:
                clusterBilling:
                  summary: Successful response
                  value:
                    records:
                      - startTime: '2026-06-01T00:00:00Z'
                        endTime: '2026-06-02T00:00:00Z'
                        clusterId: 5c2n8m4q
                        totalAmount: 99
                        gpuAmount: 95
                        diskAmount: 3
                        networkingAmount: 1
                    metadata:
                      query:
                        startTime: '2026-06-01T00:00:00Z'
                        endTime: '2026-06-02T00:00:00Z'
                        bucketSize: day
                        clusterId: 5c2n8m4q
                      recordCount: 1
                      totals:
                        totalAmount: 99
                        gpuAmount: 95
                        diskAmount: 3
                        networkingAmount: 1
                      uniqueClusterCount: 1
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '429':
          $ref: '#/components/responses/TooManyRequestsError'
        default:
          description: Error
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    BillingStartTime:
      name: startTime
      in: query
      required: false
      description: >
        Start of the billing period (RFC 3339). Defaults to 30 days ago. Snapped
        down to the start of its bucketSize bucket so the window aligns with the
        returned records; provide a boundary-aligned value (e.g. midnight for
        bucketSize=day) to avoid widening.
      schema:
        type: string
        format: date-time
      example: '2026-05-01T00:00:00Z'
    BillingEndTime:
      name: endTime
      in: query
      required: false
      description: >
        End of the billing period (RFC 3339), exclusive. Defaults to now.
        Snapped up to the end of the bucketSize bucket it lands in (unless
        already on a boundary) so the window aligns with the returned records.
      schema:
        type: string
        format: date-time
      example: '2026-06-01T00:00:00Z'
    BillingBucketSize:
      name: bucketSize
      in: query
      required: false
      description: Length of each billing time bucket. Defaults to day.
      schema:
        $ref: '#/components/schemas/BillingBucketSize'
    BillingLastN:
      name: lastN
      in: query
      required: false
      description: >
        Return the last N buckets of bucketSize, ending with the current
        (in-progress) bucket — e.g. lastN=100 with bucketSize=day is "last 100
        days". The resolved window is aligned to bucket boundaries: startTime is
        the start of the earliest bucket (e.g. midnight of the earliest day) and
        endTime is the end of the current bucket. Mutually exclusive with
        startTime/endTime; provide one or the other, not both.
      schema:
        type: integer
        minimum: 1
      example: 30
  schemas:
    ListClusterBillingResponse:
      type: object
      description: >
        Time-bucketed Instant Cluster billing records plus metadata for the
        resolved query, record count, distinct cluster count, and compute
        totals.
      required:
        - records
        - metadata
      properties:
        records:
          type: array
          items:
            $ref: '#/components/schemas/ClusterBillingRecord'
        metadata:
          $ref: '#/components/schemas/ClusterBillingMetadata'
    ErrorResponse:
      type: object
      required:
        - title
        - status
        - detail
      properties:
        title:
          type: string
          description: Short human-readable summary
          examples:
            - Not Found
        status:
          type: integer
          description: HTTP status code
          examples:
            - 404
        detail:
          type: string
          description: Human-readable explanation
          examples:
            - pod not found
        errors:
          type: array
          description: Individual request-validation failures.
          items:
            type: string
          examples:
            - - '$: additional properties ''bogus'' not allowed'
    BillingBucketSize:
      type: string
      enum:
        - hour
        - day
        - week
        - month
        - year
      x-enum-varnames:
        - BillingBucketSizeHour
        - BillingBucketSizeDay
        - BillingBucketSizeWeek
        - BillingBucketSizeMonth
        - BillingBucketSizeYear
      default: day
      description: Length of each billing time bucket.
      examples:
        - day
    ClusterBillingRecord:
      description: >
        A single time-bucketed Instant Cluster billing record. Clusters are
        GPU-only (no CPU component). Returned by GET /v2/billing/clusters.
      allOf:
        - $ref: '#/components/schemas/BillingTimeRange'
        - $ref: '#/components/schemas/ClusterBillingAmounts'
        - type: object
          required:
            - clusterId
          properties:
            clusterId:
              type: string
              description: >
                The Instant Cluster this record bills. When the clusterId filter
                is set every record carries that id; otherwise one record is
                emitted per cluster per bucket.
              examples:
                - cluster_abc123
    ClusterBillingMetadata:
      type: object
      required:
        - query
        - recordCount
        - uniqueClusterCount
        - totals
      properties:
        query:
          $ref: '#/components/schemas/ClusterBillingQuery'
        recordCount:
          type: integer
          description: Number of records returned (buckets times distinct clusters).
        uniqueClusterCount:
          type: integer
          description: Number of distinct clusters the records span.
        totals:
          $ref: '#/components/schemas/ClusterBillingAmounts'
    BillingTimeRange:
      type: object
      description: >
        Half-open time range [startTime, endTime) in RFC 3339. On a record it is
        the time bucket; on a query echo it is the resolved window.
      required:
        - startTime
        - endTime
      properties:
        startTime:
          type: string
          format: date-time
          description: Start of the range, inclusive (RFC 3339).
          examples:
            - '2026-06-01T00:00:00Z'
        endTime:
          type: string
          format: date-time
          description: End of the range, exclusive (RFC 3339).
          examples:
            - '2026-06-02T00:00:00Z'
    ClusterBillingAmounts:
      type: object
      description: >
        Instant Cluster cost components (GPU-only, no CPU). Backs a record's
        amounts and the metadata totals.
      required:
        - totalAmount
        - gpuAmount
        - diskAmount
        - networkingAmount
      properties:
        totalAmount:
          type: number
          format: double
          description: Total Instant Cluster cost in USD for the bucket.
          examples:
            - 99
        gpuAmount:
          type: number
          format: double
          description: Cluster GPU compute cost in USD for the bucket.
        diskAmount:
          type: number
          format: double
          description: Cluster disk cost in USD for the bucket.
        networkingAmount:
          type: number
          format: double
          description: Cluster inter-node networking cost in USD for the bucket.
    ClusterBillingQuery:
      allOf:
        - $ref: '#/components/schemas/BillingQuery'
        - type: object
          properties:
            clusterId:
              type:
                - string
                - 'null'
              description: The clusterId filter applied, if any.
    BillingQuery:
      description: Resolved query window and granularity (routes without a filter).
      allOf:
        - $ref: '#/components/schemas/BillingTimeRange'
        - type: object
          required:
            - bucketSize
          properties:
            bucketSize:
              $ref: '#/components/schemas/BillingBucketSize'
  responses:
    UnauthorizedError:
      description: >-
        Authentication failed because the bearer token is missing, malformed,
        expired, or invalid.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingBearerToken:
              summary: Missing bearer token
              value:
                title: Unauthorized
                status: 401
                detail: missing bearer token
    ForbiddenError:
      description: >-
        The bearer token is valid, but it does not grant access to the requested
        resource or action.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientAccess:
              summary: Insufficient access
              value:
                title: Forbidden
                status: 403
                detail: access denied
    TooManyRequestsError:
      description: >
        The caller exceeded its per-user rate limit. The response identifies the
        window that was exceeded and how long to wait. The `RateLimit` and
        `RateLimit-Policy` headers (per the IETF ratelimit-headers draft) also
        accompany successful responses, so clients can track quota before a 429.
      headers:
        Retry-After:
          description: Seconds to wait before retrying, per the exceeded window.
          schema:
            type: integer
          example: 12
        RateLimit:
          description: >
            Live per-window state as a structured-field list — one member per
            window (`minute`, `hour`, `day`) with remaining count `r` and
            seconds-until-reset `t`.
          schema:
            type: string
          example: '"minute";r=0;t=12, "hour";r=2800;t=1812, "day";r=49500;t=45012'
        RateLimit-Policy:
          description: >
            Static quota policy as a structured-field list — one member per
            window with quota `q` and window length `w` (seconds).
          schema:
            type: string
          example: '"minute";q=60;w=60, "hour";q=3000;w=3600, "day";q=50000;w=86400'
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            rateLimited:
              summary: Rate limit exceeded
              value:
                title: Too Many Requests
                status: 429
                detail: rate limit exceeded for the minute window
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Runpod API Key
      description: >
        Runpod API key authentication. Generate an API key in the Runpod console
        and send it in the `Authorization` header as `Bearer <api_key>`. Keys
        are scoped to the permissions granted when created; requests may return
        `403` when a valid key lacks access to the requested resource or action.

````