---
title: "Get API Key Usage"
method: GET
path: "/api-keys/{id}/usage"
tags: ["Team Management"]
---

# Get API Key Usage

`GET /api-keys/{id}/usage`

Retrieves usage analytics and billing data for a specific API key over a given time period. Returns cost breakdown by price type from the billing system.

## Path parameters

- `id` string, required

## Query parameters

- `start_date` string, date-time
- `end_date` string, date-time
- `group_by` 'hour' | 'day' | 'month'

## Response `200`

Usage data retrieved successfully

- object
  - `id` string — The unique identifier of the API key.
  - `api_key_id` string, uuid — The API key ID.
  - `api_key_name` string, nullable — The name of the API key
  - `team_id` string, uuid — The team ID this key belongs to
  - `period` object
    - `start` string, date-time — Start of the usage period
    - `end` string, date-time — End of the usage period
  - `total_cost_usd` number — Total cost in USD for the period
  - `cost_breakdown` object[] — Breakdown of costs by price type
    - `price_id` string — Unique identifier for the price
    - `price_name` string — Name of the price (e.g., "Neural Search", "Content Retrieval")
    - `quantity` number — Total quantity consumed
    - `amount_usd` number — Cost in USD for this price type
  - `metadata` object
    - `generated_at` string, date-time — When this report was generated

## Other responses

- `400` — Bad Request - Invalid parameters
- `401` — Unauthorized - Invalid or missing service key
- `404` — Not Found - API key does not exist
- `500` — Internal Server Error - Failed to fetch usage data

---

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