---
title: "Get billing summary information for an account"
method: GET
path: "/v1/accounts/{account_id}/billing/summary"
tags: ["Gateway"]
---

# Get billing summary information for an account

`GET /v1/accounts/{account_id}/billing/summary`

## Request

- Base URL: `https://api.fireworks.ai/inference`
- URL: `https://api.fireworks.ai/inference/v1/accounts/{account_id}/billing/summary`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/fireworks/apis/fireworks-ai-anthropic-compatible-messages-api/docs/v1/accounts/:account_id/billing/summary/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `account_id` string, required

## Query parameters

- `startTime` string, date-time, required
- `endTime` string, date-time, required
- `granularity` 'GRANULARITY_UNSPECIFIED' | 'DAILY'

## Response `200`

A successful response.

- GatewayGetBillingSummaryResponse
  - `lineItems` GatewayLineItem[]
    - `category` string
    - `groupingKey` string
    - `groupingValue` string
    - `secondaryGroupingKey` string
    - `secondaryGroupingValue` string
    - `quantity` number, double
    - `unitAmount` TypeMoney: Represents an amount of money with its currency type.
      - `currencyCode` string: The three-letter currency code defined in ISO 4217.
      - `units` string, int64: The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
      - `nanos` integer: 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.
    - `totalCost` TypeMoney: Represents an amount of money with its currency type.
      - `currencyCode` string: The three-letter currency code defined in ISO 4217.
      - `units` string, int64: The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
      - `nanos` integer: 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.
    - `series` 'USAGE_TYPE_UNSPECIFIED' | 'SERVERLESS' | 'DEDICATED_DEPLOYMENT' | 'TRAINING': - 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.
  - `usageBuckets` GatewayUsageBucket[]: Per-bucket breakdown, populated only when the request sets a non-UNSPECIFIED granularity. One bucket per period at that granularity.
    - `startTime` string, date-time: Start of the bucket.
    - `endTime` string, date-time: End of the bucket.
    - `lineItems` GatewayLineItem[]
      - `category` string
      - `groupingKey` string
      - `groupingValue` string
      - `secondaryGroupingKey` string
      - `secondaryGroupingValue` string
      - `quantity` number, double
      - `unitAmount` TypeMoney: Represents an amount of money with its currency type.
        - `currencyCode` string: The three-letter currency code defined in ISO 4217.
        - `units` string, int64: The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
        - `nanos` integer: 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.
      - `totalCost` TypeMoney: Represents an amount of money with its currency type.
        - `currencyCode` string: The three-letter currency code defined in ISO 4217.
        - `units` string, int64: The whole units of the amount. For example if `currencyCode` is `"USD"`, then 1 unit is one US dollar.
        - `nanos` integer: 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.
      - `series` 'USAGE_TYPE_UNSPECIFIED' | 'SERVERLESS' | 'DEDICATED_DEPLOYMENT' | 'TRAINING': - 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.

---

[API](https://skmtc.dev/fireworks/apis/fireworks-ai-anthropic-compatible-messages-api.md) - [All operations](https://skmtc.dev/fireworks/apis/fireworks-ai-anthropic-compatible-messages-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fireworks/apis/fireworks-ai-anthropic-compatible-messages-api/revisions/954d6bc5d922?raw)
