---
title: "Get Recent Requests"
method: GET
path: "/api/keys/{api_key}/usage/recent"
tags: ["api-keys"]
---

# Get Recent Requests

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

## Request

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

**Deprecated** — use `GET /api/auth/me/usage/recent` 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

- `limit` integer: Maximum number of recent requests to return.

## Response `200`

Most recent individual API requests

- RecentRequestsResponse: List of the most recent API requests for a key.
  - `api_key` string, required: The API key these requests belong to
  - `requests` RecentRequestEntry[], required: Recent API request log entries
    - `endpoint` string, required: API endpoint that was called
    - `method` string, required: HTTP method used
    - `status_code` integer, nullable: HTTP status code returned
    - `tokens_charged` integer: Tokens charged for this request
    - `timestamp` string, required: ISO-8601 timestamp of the request

## 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)
