this guy built a tiny device that shows your claude code usage in real time (m5stickc plus or lilygo t-display s3).


the trick is the part i love.
he sends a fake message to anthropic's api, max_tokens: 1, basically a ping.
doesn't care about the response. what he wants is the response headers.
anthropic returns anthropic-ratelimit-unified-5h-utilization and anthropic-ratelimit-unified-7d-utilization on every call. he reads those, draws the bars, sleeps 30s, repeats.
post-image
This page may contain third-party content, which is provided for information purposes only (not representations/warranties) and should not be considered as an endorsement of its views by Gate, nor as financial or professional advice. See Disclaimer for details.
  • Reward
  • Comment
  • Repost
  • Share
Comment
Add a comment
Add a comment
No comments