---
title: "Get Api Key Usage"
method: GET
path: "/api/v1/keys/{key_id}/usage"
tags: ["API Keys"]
---

# Get Api Key Usage

`GET /api/v1/keys/{key_id}/usage`

## Request

- Base URL: `https://api.seoproai.co`
- URL: `https://api.seoproai.co/api/v1/keys/{key_id}/usage`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/authorize`, token URL `https://dajosjnaalanhqksxrpe.supabase.co/auth/v1/token`)

Get usage statistics and rate limits for an API key.

Args:
    key_id: The API key ID
    user_id: Authenticated user ID (from JWT)
    db: Database client

Returns:
    Current usage statistics and limits

## Path parameters

- `key_id` string, required

## Headers

- `X-User-Id` string, nullable
- `X-Organization-Id` string, nullable
- `Authorization` string, nullable

## Response `200`

Successful Response

- APIKeyUsageLimits: Response model for API key usage and limits
  - `hourly` object, required
  - `daily` object, required
  - `monthly` object, required
  - `allowed` boolean, required
  - `limit_exceeded` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/seoproai/apis/seopro-ai.md) · [All operations](https://skmtc.dev/seoproai/apis/seopro-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/seoproai/apis/seopro-ai/revisions/5b4b6391ddc9?raw)
