Перейти к содержимому

Why prompt caching can cost you more

AI Coding Mastery

0:00 / 0:00

Why prompt caching can cost you more

19 просмотров · 3 недели назад
AI Coding Mastery
1 подписчик
19 просмотров · 3 недели назад
Prompt caching can cut the repeated part of your AI bill by 90%, or, under Anthropic's and OpenAI's current pricing, add 25%. The difference is one line at the top of your prompt. This video draws why providers can discount text they've seen before (the KV cache), why only the beginning of a prompt can be reused, what cache reads, writes and minimums cost on Anthropic, OpenAI and Gemini, and three rules for ordering your prompt. Prices as published on 4 October 2026; the $40 / $400 / $500 example is a hypothetical workload at Claude Sonnet 5.5's published rates. Sources • Anthropic — Prompt caching (Claude API docs): https://platform.claude.com/docs/en/b... • Anthropic — Pricing (Claude API docs): https://platform.claude.com/docs/en/a... • OpenAI — Prompt caching guide: https://developers.openai.com/api/doc... • Google — Gemini API context caching: https://ai.google.dev/gemini-api/docs... • Google — Gemini Developer API pricing: https://ai.google.dev/gemini-api/docs... • Hugging Face — Caching (Transformers docs): https://huggingface.co/docs/transform... • vLLM — Automatic prefix caching (design docs): https://docs.vllm.ai/en/latest/design... • Kwon et al. 2023 — PagedAttention: https://arxiv.org/abs/2309.06180 • Zheng et al. 2023 — SGLang / RadixAttention: https://arxiv.org/abs/2312.07104 Chapters 0:00 Two teams, one line 0:26 Why every call costs 1:11 What the model keeps 1:52 Why only the beginning 2:47 The fine print 4:06 The two teams, revisited 5:14 Three rules 6:12 Verdict Credits: narration is an AI voice (Google Gemini text-to-speech, voice "Charon") reading a script written for this channel; animation built with HyperFrames (open source, HeyGen); sound effects synthesised for this video; documentation screenshots quoted briefly for commentary, sources above. What's on line 1 of your system prompt right now? #PromptCaching #LLM #AIEngineering