API reference

GET /usage

Read the current month's call and token counters for your tenant. Free — never costs credits.

Read the metering roll-up for the tenant behind your API key. The call is free: no upstream request, no metering.

Endpoint

GET https://api.prom.codes/usage
Authorization: Bearer prom_live_...

Also reachable as https://prom.codes/api/v1/usage.

Response

{
  "ok": true,
  "period": "2026-07",
  "embed": {
    "calls": 1204,
    "tokens": 918230,
    "monthlyCallLimit": 1000000,
    "remainingCalls": 998796
  }
}
FieldMeaning
periodCurrent metering period, YYYY-MM in UTC. Counters reset at the month boundary.
embed.callsMetered calls this period.
embed.tokensUpstream tokens consumed this period.
embed.monthlyCallLimitYour tenant's monthly call quota (default 1,000,000).
embed.remainingCallsmonthlyCallLimit - calls, floored at 0.

Errors

StatusCodeMeaning
401INVALID_API_KEYMissing, malformed or revoked key.
502USAGE_UNAVAILABLEUsage lookup failed — retry.