Export a full week of requests, including the ordinary retries and timeouts. Keep the usage fields and any separately billed operations. Two days with the same number of requests can cost very different amounts if one sends longer documents or generates longer answers.
Group usage by provider, actual model ID, and pricing tier. Save the rate card with your date and currency. Google’s Gemini API has usage fields and separate model pricing, including context caching charges where applicable. Anthropic’s pricing guide separates cache writes from cache reads. Their billing categories are different, so map the fields for each service separately. Gemini token accounting · Gemini Developer API pricing · Anthropic pricing
Turn a week into billable groups
Export the provider’s usage metadata alongside your own request ID, task type, and any features that can incur separate charges. If a usage field includes cached tokens, follow the provider’s documented billing split before filling the sheet. Check whether pricing tiers depend on the size of a single request. Group requests on the appropriate side of that threshold before adding token totals. Track cache creation, reads, storage, and tool charges separately when they appear on the rate card.
The rates and token amounts below are invented for an example in US dollars. Quantities are per week and token rates are per million.
| Billable item | Weekly quantity | Example rate | Weekly cost |
|---|---|---|---|
| Uncached input | 6.0 million | $0.50 per million | $3.00 |
| Cache reads | 2.0 million | $0.10 per million | $0.20 |
| Generated output | 1.2 million | $1.50 per million | $1.80 |
| Cache storage and other fees in this example | 1 weekly charge | $1.00 | $1.00 |
At that pace the total is $6.00 per week, or $26.00 for an average month using 52 weeks divided by 12. For a busy month, increase the workloads that change. If the three token lines rise by 50 percent and the $1.00 fee stays flat, the weekly estimate is $8.50 and the monthly estimate is about $36.83. In a real estimate, update the share of cache hits or the hours stored if those change with the extra traffic.
Reconcile before setting a budget
Compare the spreadsheet with the provider’s usage or billing export over the same date span. Check currencies, delayed postings, free credits, model IDs, and any difference in time zone. For a trial, measure cost per accepted result as well. A cheap initial request that often needs three retries can cost more than a longer request that returns useful work on its first attempt.
Work through one log line before summing the week
Find a completed request whose input used a cache and whose output length is known. Read the metadata definition for the exact endpoint. Some token totals are inclusive, so adding a whole prompt total and the cached portion again can double count. Start with a small example. Suppose an input field includes 40,000 tokens, of which 30,000 are identified as a cache read. If the service bills the two subsets separately, put 10,000 in uncached input and 30,000 in the cache read line. Log any cache write or storage separately if billed. Confirm the meaning of each field before making that subtraction across a real export.
A model name can also conceal two rate groups. One request may exceed a pricing threshold while another small request does not. Classify each request using the provider's rule before adding its fields to a group. A weekly total can exceed a threshold even when no individual request did. Conversely, a single large request can cross a tier even if average requests remain small. Save a sample entry from either side of the boundary with the current rate card date.
Keep unsuccessful requests visible. Client-side timeouts, validation rejects and attempts during a retry can be reported differently across services. Use billing entries to tell which attempts generated usage. Reconcile by date, model and other dimensions the export supports. If the app logged the same request twice, verify the provider's account count before assuming two billable calls. When you cannot match a request, retain a small unmatched line in the estimate and investigate it with the account owner.
Compare the cost of useful work
Imagine the example week's service cost is six dollars. The tool attempted 100 drafts and 80 passed the review you require. The cost was six cents per attempted draft and seven and a half cents per approved draft. If a prompt change reduces rejected work from 20 to 10 but sends more tokens overall, compute the new cost per approved draft as well as the change in total billing. Document which results required a second run so the accepted count is consistent between setups.
Keep staff time separate from the API estimate. A cheap draft can take longer to verify if it introduces more errors, while a costlier model can reduce manual edits. Log the approved quality and staff timing under the same acceptance definition. The editing-time comparison describes a matched test that helps estimate that effort before it is included in a budget.
Add assumptions you can rerun next month
Use two different workload changes. In one scenario, request volume rises while the length and cache mix stay stable. In another, the team adds a new long-document task. Keep the older tasks in their original groups and map only the long requests to their own categories and rates. Add separately billed items using the units on the rate card, such as storage time or a count of tool invocations. Test a representative call when you need to see whether the new task records usage in those fields.
After writing the busy-month estimate, compare its forecast with the next actual invoice. If the token figures reconcile but the value is wrong, check the rates, date boundaries and currency. If an expected group is absent, check whether the app was sending the requests under a different project or account. Preserve the observed week with the estimate. That gives another operator something to check if a model changes rates or a cache stops returning the savings you expected.
Averages can also hide billing cycles. If the real account settles on calendar months, count the expected working days in the period you are budgeting. Compare that result with the weekly average before treating either as a forecast. For a month with a known migration or end-of-quarter project, add that load as a dated event.


