知识库提供英文与简体中文,以下为简体中文。
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.Codex does not charge for cache writes.Model choice, context, reasoning, tool use, retrieval, and caching all affect usage, so prompt length alone isn't a reliable estimate.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.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.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 creditscache_read_input_tokens — Tokens served from cache on this turn, billed at roughly 10% of the standard input rate实际影响
- 最贵的是长时间中断后的第一条消息:缓存已过期,所有内容重新处理。
- Claude Code 里,缓存未命中占最近用量 10% 以上时,/usage 会标出来。
官方原文于 2026-09-15 对照在线文档核对。