## Usage

Your key’s quota position as an endpoint — poll it instead of scraping rate-limit headers off your last response.

`GET /v1/usage` — authenticate with the API key itself (`Authorization: Bearer …`). Works with both key types — `sk_live_` and `sk_test_` each report their own count for the hour, named in `key_type` — and the call is free: it never consumes quota, so a monitor polling it can’t eat into your allowance.

```
curl https://maskbreak.com/v1/usage \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"

{
  "key_type": "live",            // or "test"
  "plan": "free",                // free | starter | growth | scale | custom | public_interest
  "monthly_limit": 10000,
  "month_used": 2481,
  "monthly_lookup_limit": 100000,
  "month_lookups_used": 5210,
  "month_resets_at": "2026-11-01T00:00:00.000Z",  // 00:00 UTC on the 1st of next month
  "grandfathered_until": null,   // set while an account created before 1 Oct 2026 keeps its previous allowance
  "hourly_limit": null,          // null for every key: no account has an hourly limit since 29 Oct 2026
  "used_this_hour": 412,
  "remaining": null,
  "uncapped": true,              // true for every key since 29 Oct 2026
  "resets_at": "2026-10-27T11:00:00.000Z",  // end of the rolling 60 minutes that began with your first call; null if nothing used yet
  "total_evaluations": 183204,
  "limit_hits": 3
}
```

`used_this_hour` is advisory: the hourly counters are in-memory and per-process, so they reset on a deploy — treat it as a live gauge, not an audit record; `remaining` is `null` (no key has an hourly limit since 29 October 2026). `total_evaluations` (every counted `/v1/evaluate`, `/v1/lookup` and MCP `lookup_ip` call; test-key calls, console checks and test tokens are not in it, while `month_used` and `month_lookups_used` include test-key calls and console checks) and `limit_hits` are durable account totals. Added on 30 September 2026 (additive): `plan` (`free`, `starter`, `growth`, `scale`, `custom` or `public_interest`), `monthly_limit` and `month_used` (visitor checks this calendar month), `monthly_lookup_limit` and `month_lookups_used` (`/v1/lookup` and MCP `lookup_ip` calls this month), `month_resets_at` (00:00 UTC on the 1st of next month) and `grandfathered_until` (when the previous allowance ends for an account created before 1 October 2026, otherwise `null`). Existing fields are unchanged. `monthly_limit` and `monthly_lookup_limit` are `null` when the account has no monthly cap (public interest, a custom plan, an account created before 1 October 2026 until 30 November 2026); since 29 October 2026 every key reports `hourly_limit` and `remaining` as `null` with `uncapped: true` (no account has an hourly limit).

**Limits and notices.** The monthly allowance follows the calendar month (UTC). Usage warnings are sent to the owner at about 80% and 100% of it, with one reminder about three days later while calls are still being refused; the test key’s checks count toward the allowance, so they can trigger them. `/v1/usage` consumes no evaluation quota but is limited to 120 reads/minute per address, including public-interest accounts (429 with `Retry-After`). The endpoint does not enforce the key's IP allowlist; suspension still returns 403. Repeated invalid credentials can trigger a 15-minute address lockout (429, `Retry-After: 900`).
