---
title: "Get Billing Usage"
method: GET
path: "/v1/billing/usage/"
tags: ["Billing"]
---

# Get Billing Usage

`GET /v1/billing/usage/`

## Request

- Base URL: `https://logfire-api.pydantic.dev/api`
- URL: `https://logfire-api.pydantic.dev/api/v1/billing/usage/`
- Auth: OAuth 2
  - Authorization code: `api/oauth/authorize`
  - Token URL: `/api/oauth/token` scopes: `organization:payment`
- TypeScript: <https://skmtc.dev/pydantic/apis/pydantic-logfire-api/docs/v1/billing/usage/get.ts> (a function with typed inputs; its response is checked against the schema)

Get billing usage data for the current or a previous billing period.

Use periodOffset=0 for the current period, -1 for the previous, -2 for two periods ago.

Returns usage totals, per-project breakdown, and cost calculations
for enterprise cloud organizations.

## Query parameters

- `periodOffset` integer

## Response `200`

Successful Response

- BillingUsageResponse
  - `organization` string, required
  - `billing_period` BillingPeriod, required
    - `start` string, date, required
    - `end` string, date, required
    - `anchor_day` integer, required
  - `plan` string, required
  - `usage` UsageSummary, required
    - `total_observations` integer, required
    - `breakdown` UsageBreakdown, required
      - `spans` integer, required
      - `metrics` integer, required
    - `included_observations` integer, required
    - `billable_observations` integer, required
    - `project_breakdown` ProjectUsage[], required
      - `project_name` string, required
      - `project_id` string, uuid, required
      - `observations` integer, required
  - `cost` CostSummary, required
    - `currency` string, required
    - `price_per_million_observations` number, required
    - `included_observations_value` number, required
    - `usage_cost` number, required
    - `discount` number, required
    - `total_cost` number, required

## Other responses

- `422`: Validation Error
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/pydantic/apis/pydantic-logfire-api.md) - [All operations](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pydantic/apis/pydantic-logfire-api/revisions/7996e45256f4?raw)
