---
title: "GET /ai/usage/timeseries"
method: GET
path: "/ai/usage/timeseries"
tags: ["AI Gateway Usage"]
---

# GET /ai/usage/timeseries

`GET /ai/usage/timeseries`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/ai/usage/timeseries`
- Auth: HTTP bearer

## Query parameters

- `from` string
- `to` string
- `bucket` string
- `project_id` integer

## Response `200`

Time-series usage data

- TimeseriesBucket[]
  - `avg_latency_ms` number, double, required
  - `bucket` string, required: ISO 8601 timestamp
  - `input_tokens` integer, required
  - `output_tokens` integer, required
  - `request_count` integer, required

## Other responses

- `400`: Invalid query parameters
- `401`: Unauthorized
- `403`: Insufficient permissions

## Changes

- **2026-11-09** `12896146b193`: 3 breaking
  - removed the required property `extensions` from the response with the `400` status
  - removed the required property `extensions` from the response with the `401` status
  - removed the required property `extensions` from the response with the `403` status
- **2026-10-16** `6e7c89bf1ab4`: 1 info
  - added the new optional `query` request parameter `project_id`
- **2026-10-05** `4b228ebed583`: 3 info
  - added the optional property `status` to the response with the `400` status
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status
- **2026-10-05** `63a80791dc58`: 3 warning
  - removed the optional property `status` from the response with the `400` status
  - removed the optional property `status` from the response with the `401` status
  - removed the optional property `status` from the response with the `403` status
- **2026-09-23** `f4efc4d5c7b7`: 3 info
  - added the optional property `status` to the response with the `400` status
  - added the optional property `status` to the response with the `401` status
  - added the optional property `status` to the response with the `403` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/ai/usage/timeseries/get.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
