Usage, logs & transactions
See credits remaining, recent spend, request logs, and your credit ledger from the terminal with the AnyRouter CLI.
Three read-only commands surface your account activity without leaving the terminal. They authenticate with the same key your launches use — no extra setup after login.
Credits & spend
anyr usage
Credits remaining $18.42
monthly $16.00 · top-up $2.42
Spend (24h) $1.37
Lifetime used $103.11
Top models
anthropic/claude-sonnet-4.6 $0.98 · 41 req
z-ai/glm-4.7 $0.39 · 87 req
The 24h spend and top-models lines are aggregated from your recent request logs. On a very busy day the CLI bounds how far it crawls and shows the number as a floor (≥ $…). If the network is down, the last cached snapshot prints instead, clearly marked (cached · 2h ago). Pass --no-detail to skip the log aggregation and make exactly one API call.
Request logs
anyr logs # latest 20 requests
anyr logs --limit 50 # up to 100 per call
anyr logs --status error # only failures (error code shown inline)
anyr logs --model z-ai/glm-4.7
Columns: time, status, model, tokens in/out, cost, and latency. History depth follows your plan's log-retention window.
Credit ledger
anyr transactions # newest first
anyr transactions --type purchase
Every credit movement — top-ups, per-request spend, bonuses, refunds — with the signed amount and your balance after each.
Scripting
All three commands accept --json for machine-readable output, print plain text with no colors when piped, and exit non-zero with a one-line reason on failure:
anyr usage --json | jq .balance
anyr logs --json --status error | jq '.data | length'
A key can also be passed explicitly with --key or the ANYROUTER_API_KEY environment variable — useful in CI.