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

# Get Llm Usage

`GET /developer/llm-usage`

## Request

- Base URL: `https://api.openintake.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openintake.ai/developer/llm-usage`
- Auth: none declared

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
    - `overflow` boolean: True if this bin holds all values at or above range_start
  - `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
    - `overflow` boolean: True if this bin holds all values at or above range_start
  - `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
    - `overflow` boolean: True if this bin holds all values at or above range_start
  - `components` string[]: Unique components for filtering

## Other responses

- `422`: Validation Error

## Changes

- **2026-09-07** `5e9781b57ad0`: 3 info
  - added the optional property `cost_histogram/items/overflow` to the response with the `200` status
  - added the optional property `input_token_histogram/items/overflow` to the response with the `200` status
  - added the optional property `processing_time_histogram/items/overflow` to the response with the `200` status

[Operation history](https://skmtc.dev/openintake/apis/openintake-api/changes/developer/llm-usage/get.md)

---

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