Minimal dashboard showing Claude Pro/Max usage against rate limits. Makes a tiny API call and reads the anthropic-ratelimit-unified-* response headers to surface 5h and 7d utilization.
GET /api/usage
{
"usagePercent5h": 69,
"resetIn5h": 6769,
"usagePercent7d": 9,
"resetIn7d": 440569,
"status": "allowed",
"ok": true,
"fetchedAt": 1778783831188
}| field | meaning |
|---|---|
usagePercent5h |
5h utilization % |
resetIn5h |
seconds until 5h reset |
usagePercent7d |
7d utilization % |
resetIn7d |
seconds until 7d reset |
status |
allowed or rate_limited |
ok |
HTTP success |
fetchedAt |
timestamp of last fetch |
Docker image available at ghcr.io/zareix/claude-usage-api.
# .env
CLAUDE_OAUTH_TOKEN=your_token_here
OPENCODE_API_KEY=sk-...docker compose upOr run directly:
docker run -e CLAUDE_OAUTH_TOKEN=your_token -e OPENCODE_API_KEY=sk-... -p 3000:3000 ghcr.io/zareix/claude-usage-apiRuns on port 3000. UI at http://localhost:3000.
# .env
CLAUDE_OAUTH_TOKEN=your_token_here
OPENCODE_API_KEY=sk-...bun install
bun run devView OpenCode Go usage at http://localhost:3000/?provider=opencode.
The OpenCode Go provider uses the official usage endpoint
(GET https://opencode.ai/zen/go/v1/usage) with your Go API key. It reports
5h (rolling), 7d (weekly) and monthly utilization.

