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

# Get billing summary information for an account



## OpenAPI

````yaml get /v1/accounts/{account_id}/billing/summary
openapi: 3.1.0
info:
  title: Gateway REST API
  version: 5.10.0
servers:
  - url: https://api.fireworks.ai
security:
  - BearerAuth: []
tags:
  - name: AccountService
  - name: DeploymentService
  - name: Gateway
  - name: ModelService
  - name: TrainingService
paths:
  /v1/accounts/{account_id}/billing/summary:
    get:
      tags:
        - Gateway
      summary: Get billing summary information for an account
      operationId: Gateway_GetBillingSummary
      parameters:
        - name: startTime
          description: >-
            Start time for the billing period.

            Note: Costs are aggregated daily. Only the date portion (YYYY-MM-DD)
            is used;

            the time portion is ignored. For example, 2025-10-05T07:18:29Z and

            2025-10-05T23:59:59Z are treated the same as 2025-10-05T00:00:00Z.
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: endTime
          description: >-
            End time for the billing period (exclusive).

            Note: Costs are aggregated daily. Only the date portion (YYYY-MM-DD)
            is used;

            the time portion is ignored. Costs for the end date are NOT
            included.

            For example, to get costs for Oct 5 and Oct 6, use:
              start_time: 2025-10-05T00:00:00Z
              end_time: 2025-10-07T00:00:00Z (Oct 7 is excluded)
          in: query
          required: true
          schema:
            type: string
            format: date-time
        - name: granularity
          description: >-
            Requested breakdown granularity. Defaults to UNSPECIFIED (no
            breakdown).
          in: query
          required: false
          schema:
            type: string
            enum:
              - GRANULARITY_UNSPECIFIED
              - DAILY
            default: GRANULARITY_UNSPECIFIED
        - name: account_id
          in: path
          required: true
          description: The Account Id
          schema:
            type: string
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/gatewayGetBillingSummaryResponse'
components:
  schemas:
    gatewayGetBillingSummaryResponse:
      type: object
      properties:
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/gatewayLineItem'
            type: object
          title: Individual billing line items
        usageBuckets:
          type: array
          items:
            $ref: '#/components/schemas/gatewayUsageBucket'
            type: object
          description: >-
            Per-bucket breakdown, populated only when the request sets a

            non-UNSPECIFIED granularity. One bucket per period at that
            granularity.
      title: Response for billing summary endpoint
    gatewayLineItem:
      type: object
      properties:
        category:
          type: string
          title: Category name (e.g., "Audio Transcription", "Text Completion")
        groupingKey:
          type: string
          title: Primary grouping key (e.g., "model", "model_bucket")
        groupingValue:
          type: string
          title: >-
            Primary grouping value (e.g., "whisper-v3",
            "llama-v3p3-70b-instruct")
        secondaryGroupingKey:
          type: string
          title: Secondary grouping key (e.g., "is_batch")
        secondaryGroupingValue:
          type: string
          title: Secondary grouping value (e.g., "true", "false")
        quantity:
          type: number
          format: double
          title: Quantity consumed
        unitAmount:
          $ref: '#/components/schemas/typeMoney'
          title: Unit amount (price per unit)
        totalCost:
          $ref: '#/components/schemas/typeMoney'
          title: Total cost for this line item
        series:
          $ref: '#/components/schemas/gatewayGetAccountUsageRequestUsageType'
          description: >-
            Product-line series for this line item (serverless / dedicated /
            training).

            Defaults to USAGE_TYPE_UNSPECIFIED when not classified.
      title: Individual billing line item
    gatewayUsageBucket:
      type: object
      properties:
        startTime:
          type: string
          format: date-time
          description: Start of the bucket.
        endTime:
          type: string
          format: date-time
          description: End of the bucket.
        lineItems:
          type: array
          items:
            $ref: '#/components/schemas/gatewayLineItem'
            type: object
      description: >-
        Line items for a single time bucket. The bucket size matches the
        request's

        granularity (one day for DAILY, the only granularity supported today;

        coarser buckets such as monthly may be added later).
    typeMoney:
      type: object
      properties:
        currencyCode:
          type: string
          description: The three-letter currency code defined in ISO 4217.
        units:
          type: string
          format: int64
          description: >-
            The whole units of the amount.

            For example if `currencyCode` is `"USD"`, then 1 unit is one US
            dollar.
        nanos:
          type: integer
          format: int32
          description: >-
            Number of nano (10^-9) units of the amount.

            The value must be between -999,999,999 and +999,999,999 inclusive.

            If `units` is positive, `nanos` must be positive or zero.

            If `units` is zero, `nanos` can be positive, zero, or negative.

            If `units` is negative, `nanos` must be negative or zero.

            For example $-1.75 is represented as `units`=-1 and
            `nanos`=-750,000,000.
      description: Represents an amount of money with its currency type.
    gatewayGetAccountUsageRequestUsageType:
      type: string
      enum:
        - USAGE_TYPE_UNSPECIFIED
        - SERVERLESS
        - DEDICATED_DEPLOYMENT
        - TRAINING
      default: USAGE_TYPE_UNSPECIFIED
      description: >-
        - USAGE_TYPE_UNSPECIFIED: Default value. When specified (or when
        usage_type field is not set),

        returns usage data for all deployment types: serverless requests,
        dedicated deployments,

        and training jobs.
         - SERVERLESS: Returns only serverless usage data.
        Filters the response to include only usage from serverless API requests.
         - DEDICATED_DEPLOYMENT: Returns only dedicated deployment usage data.
        Filters the response to include only usage from dedicated deployments.
         - TRAINING: Returns only training job usage data (SFT/DPO token usage and RFT / service-mode
        trainer GPU-seconds usage). Inference deployments serving rollouts for
        RFT /

        online RL are reported under DEDICATED_DEPLOYMENT (not TRAINING) to
        avoid

        double counting GPU time.
      title: Usage type to query usage for
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication using your Fireworks API key. Format: Bearer
        <API_KEY>
      bearerFormat: API_KEY

````