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
}
}| Field | Meaning |
|---|---|
period | Current metering period, YYYY-MM in UTC. Counters reset at the month boundary. |
embed.calls | Metered calls this period. |
embed.tokens | Upstream tokens consumed this period. |
embed.monthlyCallLimit | Your tenant's monthly call quota (default 1,000,000). |
embed.remainingCalls | monthlyCallLimit - calls, floored at 0. |
Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | INVALID_API_KEY | Missing, malformed or revoked key. |
| 502 | USAGE_UNAVAILABLE | Usage lookup failed — retry. |
Related
- POST /embed & /rerank — the metered calls.
- Rate limits — how quotas work.