---
title: "Get API key usage"
method: GET
path: "/v1/manage/apikey/{id}/usage"
---

# Get API key usage

`GET /v1/manage/apikey/{id}/usage`

Get usage statistics for a specific API key within a date range

## Path parameters

- `id` string, uuid, required

## Request body

- GetApiKeyUsageRequest
  - `start` string, date-time, required — Start date in RFC3339 format (e.g., 2025-01-01T00:00:00Z). Required. The date range cannot exceed 100 days from start to end.
  - `end` string, date-time — End date in RFC3339 format (e.g., 2025-01-31T23:59:59Z). Optional. Defaults to 24 hours from start if not specified. Must be after start date. The date range cannot exceed 100 days.
  - `group_by` string[] — Fields to group by: user_id, model_requested, or extra.<field_name>
  - `resolution` 'hour' | 'day' | 'month' — Time resolution for aggregation

## Response `200`

Successfully retrieved usage data

- GetApiKeyUsageResponse
  - `usage` object, required — Map of period (string) to usage entry

## Other responses

- `400` — Bad request - malformed payload or invalid parameters.
- `401` — Unauthorized - missing or empty Authorization header.
- `402` — Payment required - organization balance exhausted.
- `403` — Forbidden - invalid token or model not in access list.
- `404` — Not found - provider/model not supported.
- `429` — Rate limit exceeded. Retry after the Retry-After header value.
- `500` — Internal server error.
- `502` — Bad gateway - upstream provider returned an invalid response.

---

[API](https://skmtc.dev/requesty/apis/requesty-api.md) · [All operations](https://skmtc.dev/requesty/apis/requesty-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/requesty/requesty-api/revisions/63bc7d99ccde/schema)
