Prompt caching
by Anthropic · Technique · Text & code
Reuses the unchanged beginning of a prompt between API requests, so repeated long inputs are read from a cache and cost far less.
Cut a Claude Code bug-fixing job's cost by about 75-80% in one test
Latest · Nov 10Across two rounds (bug hunt on a 42-file app, 16 planted bugs), caching off cost about 4.2x more: $0.79 vs $2.77, and $0.78 vs $3.83
Why we say so
Beckon AI ran the same 14-bug fix with caching on and off: $0.79 vs $2.77 in one round and $0.78 vs $3.83 in another, with over 90% of input tokens served from cache. Pricing the cached run's tokens as uncached gives $3.09 vs $0.79 actual. This is one tester on one kind of job, and no speed gain is claimed. Anthropic's documentation says the cache lasts 5 minutes by default and one changed character in the prompt prefix causes a miss.
Evidence
- Nov 10Same Claude Code job cost $0.79 with prompt caching on and $2.77 with it off, both fixing the same 14 bugsHands-on test
Beckon AI - Nov 10Pricing the cached run's exact tokens as uncached gives $3.09 versus $0.79 actual, 75% off on identical trafficHands-on test
Beckon AI - Nov 10Over 90% of input tokens were cache hits in both rounds; by call 10 it read 91,000 cached tokens and wrote 577Hands-on test
Beckon AI - Nov 10Cached runs finished slightly sooner both times, but with two rounds on different paths no speed number is claimedHands-on test
Beckon AI - Nov 10
Show all 10
- Nov 10
- Nov 10
- Nov 10
- Nov 10
- Nov 10