---
title: "Get Llm Usage"
method: GET
path: "/developer/llm-usage"
tags: ["Developer", "Developer - Metrics"]
---

# Get Llm Usage

`GET /developer/llm-usage`

Aggregated LLM usage metrics across all customers (developer only).

Aggregation runs in Postgres — the response contains chart-ready
summaries and histograms, not raw rows.

## Query parameters

- `period` string
- `input_token_bin_width` integer
- `cost_bin_width` number
- `processing_time_bin_width` integer

## Response `200`

Successful Response

- LLMUsageResponse — Aggregated LLM usage response.
  - `overall` LLMUsageOverallStats, required — Aggregate stats across all components.
    - `total_calls` integer, required — Total LLM calls
    - `total_input_tokens` integer, required — Sum of input tokens
    - `total_output_tokens` integer, required — Sum of output tokens
    - `total_cost` number, required — Total cost in USD
    - `avg_input_tokens` integer, required — Average input tokens per call
    - `avg_output_tokens` integer, required — Average output tokens per call
    - `avg_processing_time_ms` number, nullable — Average processing time, ms
  - `by_component` LLMUsageComponentSummary[] — Per-component aggregates
    - `component` string, required — Component that made the LLM call
    - `total_calls` integer, required — Total LLM calls for this component
    - `total_input_tokens` integer, required — Sum of input tokens
    - `total_output_tokens` integer, required — Sum of output tokens
    - `total_cost` number, required — Total cost in USD
    - `input_cost` number, required — Cost attributable to input tokens
    - `output_cost` number, required — Cost attributable to output tokens
    - `avg_processing_time_ms` number, nullable — Average processing time, ms
    - `min_processing_time_ms` integer, nullable — Minimum processing time, ms
    - `max_processing_time_ms` integer, nullable — Maximum processing time, ms
    - `p90_processing_time_ms` number, nullable — 90th percentile processing time, ms
    - `p95_processing_time_ms` number, nullable — 95th percentile processing time, ms
    - `p99_processing_time_ms` number, nullable — 99th percentile processing time, ms
  - `input_token_histogram` LLMUsageHistogramBin[] — Input token distribution
    - `range_start` number, required — Start of bin range (inclusive)
    - `range_end` number, required — End of bin range (exclusive)
    - `counts` object — Counts keyed by component
  - `cost_histogram` LLMUsageHistogramBin[] — Cost distribution
    - `range_start` number, required — Start of bin range (inclusive)
    - `range_end` number, required — End of bin range (exclusive)
    - `counts` object — Counts keyed by component
  - `processing_time_histogram` LLMUsageHistogramBin[] — Processing time distribution
    - `range_start` number, required — Start of bin range (inclusive)
    - `range_end` number, required — End of bin range (exclusive)
    - `counts` object — Counts keyed by component
  - `components` string[] — Unique components for filtering

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/openintake/apis/fastapi.md) · [All operations](https://skmtc.dev/openintake/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintake/fastapi/revisions/4a81645b59f6/schema)
