I've been running the Anthropic API in production across a few small experiments for the last couple months. The docs are good but they don't cover the things that actually bite you. Here are 5 things I wish I'd known on day 1.
A free 1-page cheatsheet with these is at the bottom if you just want a take-home.
1. Prompt caching has a write cost — and that cost can wipe out your savings
The Anthropic docs make caching sound free. It isn't. Cache writes cost about 1.25× normal input rate. Cache reads cost about 0.1× normal input rate. So:
cache_write = 1.25 × normal_input cache_read = 0.10 × normal_input breakeven = ~2 reuses after the write
Enter fullscreen mode
Exit fullscreen mode
The trap: an A/B experiment that randomizes system prompts.…