---
title: "Me"
method: GET
path: "/api/auth/me"
tags: ["auth"]
---

# Me

`GET /api/auth/me`

## Request

- Base URL: `https://api.halalterminal.com`
- URL: `https://api.halalterminal.com/api/auth/me`
- Auth: API key in header `X-API-Key`

Return plan, quota, and identity for the calling API key.

Requires the X-API-Key header. Calling this endpoint does not consume
tokens — it's safe to poll for live quota state.

**curl example**:
```bash
curl -H "X-API-Key: ht_abc123" https://api.halalterminal.com/api/auth/me
```

## Response `200`

Plan, quota, and identity for the calling API key

- KeyUsageResponse: Detailed usage statistics for an API key.
  - `api_key` string, required: The API key these stats belong to
  - `email` string, required: Email associated with the key
  - `plan` string, required: Current plan tier
  - `tokens_used` integer, required: Tokens consumed this billing period
  - `tokens_limit` integer, required: Monthly token allowance (-1 = unlimited)
  - `requests_used` integer, required: Total requests consumed
  - `requests_limit` integer, required: Maximum requests allowed under the plan
  - `billing_period_start` string, nullable: Start of current billing period
  - `billing_period_end` string, nullable: End of current billing period
  - `is_active` boolean, required: Whether the key is currently active
  - `created_at` string, required: ISO-8601 creation timestamp
  - `updated_at` string, required: ISO-8601 timestamp of last usage update
  - `top_endpoints` EndpointStat[]: Most frequently called endpoints
    - `endpoint` string, required: API endpoint path
    - `method` string, required: HTTP method (GET, POST, etc.)
    - `count` integer, required: Number of requests to this endpoint
    - `total_tokens` integer: Total tokens charged for this endpoint
  - `price_monthly` number, nullable: Actual monthly price in USD from the key's Stripe subscription (reflects custom pricing). Null when no subscription is attached.

## Other responses

- `401`: Missing or invalid API key

---

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