It depends. If you have a Claude Code subscription then it defaults to an hour, if you use Claude via an API or third party then it defaults to 5 minutes. You can opt-in to the 1 hour TTL but it obviously costs more.
> 5-minute cache write tokens are 1.25 times the base input tokens price
> 1-hour cache write tokens are 2 times the base input tokens price
It depends. If you have a Claude Code subscription then it defaults to an hour, if you use Claude via an API or third party then it defaults to 5 minutes. You can opt-in to the 1 hour TTL but it obviously costs more.
> 5-minute cache write tokens are 1.25 times the base input tokens price > 1-hour cache write tokens are 2 times the base input tokens price
https://code.claude.com/docs/en/prompt-caching#on-a-claude-s...
https://platform.claude.com/docs/en/build-with-claude/prompt...