缓存算不算额度?

两家的缓存输入都算,只是按更低的费率。Codex 写缓存不收费;Claude 重复引用项目内容不再计。订阅窗口里的具体折扣两家都没公布。

Codex

缓存输入按更低费率计;写缓存免费。

在公布的 credit 费率里,缓存输入 token 是普通输入的十分之一(GPT-5.6 Sol:每百万输入 100 credits,缓存输入 10 credits),而且 Codex 不对写缓存收费。至于套餐内的 5 小时和周额度,OpenAI 只说缓存会影响用量,没有公布折扣比例。

官方原文

Charges are based on the model used and the actual input, cached input, and output tokens consumed.
OpenAI Help Center · ChatGPT Rate Card
Codex does not charge for cache writes.
OpenAI Help Center · ChatGPT Rate Card
Model choice, context, reasoning, tool use, retrieval, and caching all affect usage, so prompt length alone isn't a reliable estimate.
OpenAI Developers · Codex pricing

Claude

缓存读取算,按缓存费率;重复引用项目内容不再计。

claude.ai 上,项目内容会被缓存,重复引用时只有新增或未缓存的部分计入。Claude Code 每一轮都按缓存费率重读整段对话,所以在开了一整天的会话里问一句话,仍然按整段历史计用量。订阅下缓存保留一小时(子 agent 和使用用量积分时为五分钟);中断超过这个时长,下一条消息会重新处理全部上下文。缓存折扣在订阅额度里具体怎么算,Anthropic 没公布。

官方原文

Content in projects is cached and doesn't count against your limits when reused. Similar prompts you use frequently are partially cached.
Claude Help Center · Usage limit best practices
With prompt caching, Claude Code re-reads that history at the cached token rate, so a one-line question in a session that has been open all day still draws usage for the whole conversation.
Claude Code docs · Manage costs effectively
Cache misses: your first message after a break longer than the cache lifetime misses the cache and reprocesses your full context. The lifetime is an hour on a subscription and drops to five minutes once you're drawing on usage credits
Claude Code docs · Manage costs effectively
cache_read_input_tokens — Tokens served from cache on this turn, billed at roughly 10% of the standard input rate
Claude Code docs · How Claude Code uses prompt caching

实际影响

  • 最贵的是长时间中断后的第一条消息:缓存已过期,所有内容重新处理。
  • Claude Code 里,缓存未命中占最近用量 10% 以上时,/usage 会标出来。

官方原文于 2026-09-15 对照在线文档核对。

答案依据 OpenAI、Anthropic 官方文档,每页附原文与链接 · 不代表官方背书。