Original Reddit post

I’ve been using Claude Code pretty heavily, so I tracked my API usage for a week to understand what was actually driving the bill. The biggest surprise was prompt caching.Over 7 days, I ran around 15K requests across a few API routes, based on my normal Claude Code workflow rather than a benchmark. I tried to keep the setup consistent: similar coding tasks, same repos, prompt caching enabled, streaming enabled, and the same test region. Roughly, I saw: 545K uncached input tokens per route 21M cache creation tokens per route 870M cache read tokens per route 6.5M output tokens per route The route I used most had about a 97% cache hit rate. Before this, I mostly compared providers by advertised input/output token prices. But for long Claude Code sessions, cache creation and cache reads seem to affect the real cost a lot more than I expected. Now I’m trying to compare routes by actual cost per coding task, including: Total cost per session Cache hit rate Cache creation vs cache read cost Latency Rate limits Failed / retried requests Reliability Disclosure: I’m affiliated with ByteUnion AI, which is one of the OpenAI-compatible routes I’m testing. I’m not presenting this as an independent benchmark or recommendation; I’m mainly trying to understand how cache behavior affects real Claude Code costs across routes. For people using Claude Code heavily through APIs: do you usually factor cache hit rate into cost comparisons, or do you mostly look at headline token pricing, latency, and rate limits? I’m curious how others calculate real cost per coding task. submitted by /u/Antique-Drive-1190

Originally posted by u/Antique-Drive-1190 on r/ClaudeCode