---
title: "Get token histogram by provider"
method: GET
path: "/api/logs/histogram/tokens/by-provider"
tags: ["Logging"]
---

# Get token histogram by provider

`GET /api/logs/histogram/tokens/by-provider`

Returns time-bucketed token usage with provider breakdown.

## Query parameters

- `providers` string
- `models` string
- `status` string
- `objects` string
- `selected_key_ids` string
- `virtual_key_ids` string
- `routing_rule_ids` string
- `routing_engine_used` string
- `start_time` string, date-time
- `end_time` string, date-time
- `min_latency` number
- `max_latency` number
- `min_tokens` integer
- `max_tokens` integer
- `min_cost` number
- `max_cost` number
- `missing_cost_only` boolean
- `content_search` string

## Response `200`

Successful response

- object — Time-bucketed token histogram with provider breakdown
  - `buckets` object[]
    - `timestamp` string, date-time
    - `by_provider` object — Token usage breakdown by provider name
  - `bucket_size_seconds` integer
  - `providers` string[]

## Other responses

- `400` — Bad request
- `500` — Internal server error

---

[API](https://skmtc.net/getbifrost/apis/bifrost-api.md) · [All operations](https://skmtc.net/getbifrost/apis/bifrost-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbifrost/bifrost-api/versions/f8cab88f64ea/schema)
