r/ClaudeCode • • 6d ago

Tips & Workflows Switching a long agent workload to a API

long coding sessions are often cache reads like the same prompt and history read again every turn so once that work moves to an api the bill is mostly the cached price times the hit rate you actually get

on paper the cached price barely differs, deepseek direct bills a hit at about 2% of a miss off peak and deepinfra's ds flash listing is around 3%. so hit rate is the differentiating thing so run one normal day on the new endpoint and read the cached tokens in the usage block

and if compliance is the reason for moving, read the data page itself, whether inputs ever touch disk and what gets logged

0 Upvotes

3 comments sorted by

•

u/AutoModerator 6d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/Unusual-Albatross43 5d ago

if the workload is moving off a claude subscription onto an api key, the cache lifetime changes too, not only the price. on a subscription claude code gets the 1 hour cache, on an api key the default is 5 minutes. so the same working day gets a lower hit rate with nothing else changed, because every pause over 5 minutes is a full rewrite.

at opus 5.5 prices a cold message at 150k context is about $0.75 and a warm one about $0.03. i'd count how many gaps over 5 minutes a normal day has before trusting the price sheet.

do the deepseek endpoints say how long their cache lives?