---
title: "Get Daily Usage"
method: GET
path: "/api/keys/{api_key}/usage/daily"
tags: ["api-keys"]
---

# Get Daily Usage

`GET /api/keys/{api_key}/usage/daily`

## Request

- Base URL: `https://api.halalterminal.com`
- URL: `https://api.halalterminal.com/api/keys/{api_key}/usage/daily`
- Auth: API key in header `X-API-Key`

**Deprecated** — use `GET /api/auth/me/usage/daily` instead.

The path-parameter form leaks the key into Caddy/proxy access logs.
The replacement reads from the `X-API-Key` header only.

## Path parameters

- `api_key` string, required: API key whose usage to read.

## Query parameters

- `days` integer: Trailing days to include.

## Response `200`

Per-day request and token counts for the specified period

- DailyUsageResponse: Per-day usage breakdown for an API key.
  - `api_key` string, required: The API key these stats belong to
  - `days` integer, required: Number of days included in the breakdown
  - `daily` DailyUsageEntry[], required: Per-day request and token counts
    - `date` string, required: Calendar date in YYYY-MM-DD format
    - `count` integer, required: Number of API requests made on this date
    - `tokens` integer: Total tokens charged on this date

## Other responses

- `403`: Caller does not own this API key
- `404`: API key not found
- `422`: Validation Error
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/halalterminal/apis/halal-terminal-api.md) · [All operations](https://skmtc.dev/halalterminal/apis/halal-terminal-api/llms.txt) · [OpenAPI document](https://skmtc.dev/halalterminal/apis/halal-terminal-api/revisions/78768b250943?raw)
