免費諮詢
技術Anthropic 官方核心文件;2026-10-07 Sonnet 5.5 快取讀取降價為 0.05xToken節費與提示工程

Claude 官方文件:Prompt caching 快取讀取只要 0.1 倍(新模型 0.05 倍)

Claude Developer Platform docs: Prompt caching

來源:Anthropic(platform.claude.com 官方文件)・發布 2026-10-07・本站摘要分析(非全文轉載)

📌 一句話啟示:會用快取就能把 AI API 帳單砍九成,對要自己串 API 做小工具的上班族是必修。

摘要分析

Prompt caching 是 Claude API 最直接的省錢機制:快取 tools→system→messages 前綴,命中時跳過重算。官方文件列出倍率:5 分鐘寫入 1.25 倍、1 小時寫入 2 倍、讀取多數模型 0.1 倍,Opus 5.5/Sonnet 5.5 降到 0.05 倍(2026-10-07 調整)。2026 年新增自動快取:請求最上層加 cache_control ephemeral 即可,也可手動放最多 4 個斷點。注意最短 512 token、斷點別放在每次都變的內容,並以 usage 的 cache_read_input_tokens 驗證。

  • 倍率:5 分鐘寫入 1.25x、1 小時寫入 2x、讀取 0.1x(Opus/Sonnet 5.5 為 0.05x)
  • 自動快取:client.messages.create(..., cache_control={"type":"ephemeral"}) 放在最上層
  • 手動最多 4 個斷點,放在「每次請求都相同」的最後一塊
  • 新模型最短 512 token 才會快取;看 usage.cache_read_input_tokens 確認命中
  • max_tokens:0 可預熱快取;預設 TTL 5 分鐘、每次讀取免費續期

Prompt caching is the most direct cost lever on the Claude API: the tools→system→messages prefix up to a cache_control breakpoint is reused, skipping reprocessing on a hit. The official docs list the multipliers: 5-minute cache writes cost 1.25x base input, 1-hour writes 2x, and reads 0.1x for most models, dropping to 0.05x on Opus 5.5 and Sonnet 5.5 (updated 2026-10-07) and 0.025x on Fable 5.1. A 2026 addition is automatic caching: add a top-level cache_control={'type':'ephemeral'} and the system places the breakpoint on the last cacheable block and moves it forward as the conversation grows; up to four explicit breakpoints may be combined. Mind the minimum cacheable length (512 tokens on newer models), never put a breakpoint on content that changes every request, verify hits via cache_read_input_tokens in usage, and pre-warm with max_tokens: 0.

  • Multipliers: 1.25x 5-min write, 2x 1-hour write, 0.1x read (0.05x on 5.5 models)
  • Automatic caching via top-level cache_control ephemeral
  • Up to 4 explicit breakpoints on stable content
  • 512-token minimum on newer models; check cache_read_input_tokens
  • Pre-warm with max_tokens: 0; 5-minute TTL refreshed on read

關鍵字:prompt cachingClaude APItoken 節費cache_controlTTL

來源原文:https://platform.claude.com/docs/en/build-with-claude/prompt-caching
本頁為報導內容的摘要與分析,版權屬原媒體所有;請以原文為準。

看完趨勢,下一步

對應的變現路徑與聯成課程

路徑 A 職場加薪路徑 B 轉職高薪

產學就業班路徑 B

AI 人工智慧工程師

整合 Python、爬蟲與 AI 數據分析,從深度學習基礎到實務部署,切入年薪中位數逾百萬的熱門職缺。

就業待遇 $62,000~$80,000

到官網了解課程

到聯成官網免費諮詢

同主題報導

技術文章・OpenAI Cookbook・openai/openai-cookbook ⭐76.6k;Cookbook Evals 主題首篇(2026-09-14)・2026-09-14・Token節費與提示工程

OpenAI Cookbook:客服 agent 成本與品質最佳化,四輪把每張工單成本砍 95%

Optimizing Customer Support Agents for Cost and Quality

OpenAI Cookbook(repo ⭐7.7 萬)2026-09-14 驗證的這篇教一套可重複的最佳化迴圈:量基準、每次只改一件事、品質過關才接受省下的成本。範例是電商客服 agent,四輪結果:壞基準每張工單 1…

看摘要分析 →
技術文章・The New Stack・The New Stack 2026-08-18 報導,社群多篇省 token 文章引用・2026-08-18・Token節費與提示工程

The New Stack:一個 Claude Code skill 開口前先吃掉 20 萬 token,官方如何降到 2.5 萬

A Claude Code skill was eating 200,000 tokens before answering a single question

The New Stack 2026-08-18 報導:Anthropic 自家的 /claude-api skill 在 Claude Code 2.1.201 把參考文件整包嵌進 skill 本體,使用者還沒提問就先…

看摘要分析 →

1 分鐘測出你的變現路徑

免費職涯/變現診斷 → 專屬學習地圖 → 成果里程碑計畫書。全台 26 校,週一至五 09:00–18:00。

免費變現路徑診斷LINE 官方帳號撥打 0800-580-581