Is Prompt Caching Actually Lowering Your AI API Bill?

Illustrated infographic summarizing: Is Prompt Caching Actually Lowering Your AI API Bill?

By Greg Nowak. Updated 13 October 2026.

Prompt caching can lower your AI API bill when requests reuse the same substantial opening context. But a higher cache-hit count does not tell you whether your business is paying less for useful work.

For an agency producing recurring briefs, or an operations team extracting records from documents, the useful question is: what does one accepted result cost? That includes failed attempts, retries and review time. Before increasing volume, choose one recurring workflow and measure whether caching improves its economics under normal working conditions.

Start with the cost of completed work

Define the finish line before changing the prompt. A completed extraction might be a record that passes validation. A completed draft might be copy accepted for the next editorial stage. Keep that acceptance threshold fixed throughout the comparison.

API cost per completed task = all API charges for the workflow ÷ accepted completed tasks.

Include intermediate calls, rejected outputs, retries and any cache-warming requests. Count each accepted business result once. Track human review minutes separately; if you value that time at an agreed hourly rate, you can also compare total delivery cost.

For agencies, choose a boundary that matches the work you sell. Measuring the cost of an individual model response can hide the expense of the research, checking and revision calls needed to deliver a brief ready for a client.

Check what your provider actually charges

Use rates for your exact model and processing tier. OpenAI's current pricing lists separate input, cached-input, cache-write and output categories. GPT-5.6 and later have a write multiplier of 1.25 times ordinary input; reads are generally 0.1 times, but GPT-6.1 Sol uses 0.05 times. Earlier models have no additional write charge. Check the OpenAI pricing tables before calculating savings.

Anthropic charges 1.25 times base input for five-minute writes and twice base input for one-hour writes. Reads normally cost 0.1 times, with lower multipliers on some models. Its prompt caching documentation lists the exceptions. Longer retention needs enough reuse to justify the extra write cost.

Here is an illustrative calculation using a 1.25 write multiplier and a 0.1 read multiplier: processing the same eligible prefix twice costs 1.35 units with one write and one successful read, versus 2 units without caching. That saving applies only to the reused input. Output, changing context and other charges still need to be added.

Give reusable context a stable place

Inspect actual outgoing requests. Put stable instructions and reference material first, then changing task data. Keep tool definitions in a consistent order. Investigate timestamps, random identifiers or reordered blocks that could break prefix matching.

For a recurring brief, that could mean keeping the editorial rules and output requirements together, followed by the current assignment and research. Preserve information the task needs, record a prompt version, and check that moving content has not changed the quality of the result.

OpenAI requires at least 1,024 visible input tokens for a cacheable prefix on GPT-5.6 and later; earlier models have different eligibility rules. Current retention controls also differ by model family. Use the OpenAI prompt caching guide for your integration rather than copying settings from an older example.

Run the comparison at the pace of normal work

Compare the existing request construction with one small revision. Hold the model, output settings and acceptance criteria steady. Use representative routine tasks and difficult inputs, with similar task mixes in both runs.

Include quiet periods, bursts and the concurrency you expect in production. A rapid replay is useful for diagnosing cache behavior, but it can overstate reuse in a workflow that receives requests hours apart. Record cold starts and later misses as part of the test.

Agree beforehand what would justify rollout: lower cost per accepted task, acceptable completion time and no increase in correction work. This makes the decision easier when the results are mixed.

Log usage without double-counting tokens

Keep each provider's raw usage response alongside your task identifier, prompt version, model, retry count, completion status and elapsed time. Report total spend and accepted-task count as well as the average.

For OpenAI Responses, record usage.input_tokens_details.cached_tokens and, where applicable, usage.input_tokens_details.cache_write_tokens. Its documented calculation subtracts reads and writes from total input before pricing ordinary input. See the usage calculation.

Anthropic's usage.input_tokens excludes cache reads and writes. Track cache_read_input_tokens and cache_creation_input_tokens separately; when using both retention windows, split writes by duration. Reusing an OpenAI accounting formula here would produce the wrong total. Check Anthropic's usage fields.

Use the test results to choose the next step
What changed? What to check Decision
Task cost fell; quality held Was request timing realistic? Roll out gradually and monitor.
Cache reads rose; task cost stayed flat Write charges, output costs and retries Find the largest remaining expense.
Writes rose; reuse stayed low Changing prefixes and gaps between requests Revisit prompt construction or retention.
API cost fell; review time rose Total delivery cost Resolve the quality tradeoff first.
Estimates differ from provider charges Missing calls, reporting period and project scope Reconcile before claiming savings.

Match the calculation to the bill

OpenAI's organization Usage API includes cost reporting with monetary amounts and grouping by project and line item. Compare that accounting view with your application records using the same time boundaries and project scope.

Investigate unrelated traffic, missing records and charges outside your token estimate. Keep unresolved differences visible. A smaller monthly bill alone cannot establish that caching helped if volume, models or the task mix also changed.

Put the findings into everyday operation

If you use LiteLLM, budget_duration sets the budget reset period. Budget enforcement requires a connected database; team keys follow team and team-member budgets rather than the owner's personal budget. Check the LiteLLM budget documentation and test what happens when a limit is reached. Assign someone to review spend and handle exceptions.

A focused review with Greg can start with one workflow: inspect request construction, test a targeted change, reconcile charges and recommend operating limits. The useful deliverable is a repeatable cost comparison your team can use as prompts, models and volume change.

Bring a sample workflow, representative requests and whatever usage records you have. Discuss an AI cost review with Greg and agree a practical scope.

Related on GrN.dk

Need help with this kind of work?

Discuss an AI cost review with Greg Get in touch with Greg.

Sources

Seneste artikler

Lad AI kundeservice hente ordrestatus fra Shopify og Shipmondo. Se, hvordan I afgrænser opgaven, kontrollerer kundens identitet og sender usikre sager videre.

Når kunden beder om indsigt, kan AI hjælpe med at samle materiale fra WordPress og Microsoft 365. Se, hvordan I holder styr på datakilder, ansvar og kontrol.

Når en ingrediens ændres, kan menukortet kræve rettelser, selv om opskriftsdatoen står stille. Sådan kan AI hjælpe med gennemgang og godkendelse i WordPress.

Når checkout fejler, skal driftspartneren have noget konkret at arbejde med. Se, hvordan AI, dmesg og journalctl kan samle sporene i en brugbar driftssag.

Brug oktober til at afprøve daglige AI-forslag til genbestilling før Black Friday. Få styr på Shopify-data, leveringstid og budget, før forslagene bliver til indkøb.

Jeg lærte serverdrift ved at ødelægge mine egne servere. Jeg søger en, der vil stå ved siden af mig, mens jeg gør det, og så gøre det selv ugen efter.

Jeg er god til at bygge og dårlig til at ringe. Her er, hvem jeg vil have ved siden af mig, hvad der er lettest at sælge, og hvordan vi deler det.

AI kan samle onboardingopgaverne før første arbejdsdag. Se, hvordan lederen godkender konkret adgang, og hvordan åbne opgaver bliver fulgt til dørs.

En AI-assistent kan svare på spørgsmål og føre kunder til booking. Her er de konkrete grænser for pris, levering, personoplysninger og kontakt med en medarbejder.

Et sikkert AI-workflow kan omsætte Meet- og Teams-transskripter til godkendte beslutninger og opgaver i Jira eller Asana – uden at slippe kontrollen.