A $0.0065 AI Bill, Explained Line by Line
01 / Four receipt lines, one tiny budget
If your AI budget is $5, start by understanding one request before running a hundred. Input, output, cache write and cache read describe different kinds of token usage. They can carry different rates, so the largest token count is not necessarily the largest charge. Provider pricing tables separate these categories. ([platform.claude.com](https://platform.claude.com/docs/en/about-claude/pricing))
CheapRelay bills per real token, including cache reads and writes, with no monthly fee or subscription. That makes the useful question concrete: what did this request consume, and what rate applied? The receipt below uses fictional rates for arithmetic practice, not advertised CheapRelay prices.
02 / Input pays for material the model processes
Input is the material supplied to the model: instructions, your question, documents and any conversation history included in the request. A short question can arrive with a long background. Cached portions need separate accounting according to the API's usage definitions. ([platform.claude.com](https://platform.claude.com/docs/en/build-with-claude/prompt-caching))
For a first experiment, send one small document and one specific question. Avoid attaching your entire project merely because it fits. Your goal is to learn the cost of a useful task, not test the largest possible prompt.
03 / Output pays for generated tokens
Output is the model's generated token usage, charged at its output rate. Do not assume that rate matches input: provider price tables list them separately. For models with reasoning features, check the billing definition rather than estimating usage from the visible answer alone. ([platform.claude.com](https://platform.claude.com/docs/en/about-claude/pricing))
Ask for the deliverable you actually need: five bullets, a short explanation or one corrected function. Set a modest output limit for testing, then check whether the response finished. An unfinished answer is not a bargain if you must repeat the job.
04 / Cache writes prepare reuse; cache reads reuse it
A cache write records reusable prompt content. A cache read uses previously cached content in a later request. This concerns prompt processing, not a promise to return an old answer. Write rates, read rates and cache lifetimes depend on the model and service. ([platform.claude.com](https://platform.claude.com/docs/en/build-with-claude/prompt-caching))
Caching also has eligibility requirements. Reuse generally depends on a matching prompt prefix, and minimum lengths and expiration rules apply. Keep reusable instructions first and changing questions afterward, but confirm a cache hit in usage data instead of assuming repetition guarantees one. ([developers.openai.com](https://developers.openai.com/api/docs/guides/prompt-caching))
05 / A fictional $0.0065 receipt
Assume these invented rates per million tokens: $1 input, $4 output, $1.25 cache write and $0.10 cache read. Suppose a request reports four separate, non-overlapping billing buckets:
- ■ Input: 1,000 tokens ÷ 1,000,000 × $1 = $0.001.
- ■ Output: 500 tokens ÷ 1,000,000 × $4 = $0.002.
- ■ Cache write: 2,000 tokens ÷ 1,000,000 × $1.25 = $0.0025.
- ■ Cache read: 10,000 tokens ÷ 1,000,000 × $0.10 = $0.001.
The total is $0.0065, or 0.65 cents. The 10,000-token cache read costs less than the 500-token output in this example. One hundred identical receipts would cost $0.65. That is arithmetic, not a forecast: actual usage and rates will differ.
06 / Do not count cached input twice
Check whether an API reports cached tokens inside total input or in separate fields. For example, OpenAI exposes cached-token details within input usage. Adding those tokens to total input again would overcount them. Translate the response into billing buckets before multiplying by rates. ([developers.openai.com](https://developers.openai.com/api/docs/guides/prompt-caching))
07 / A $5 test plan before unattended runs
- ■ Choose a $0.50 experimental spending ceiling; do not assume the service enforces it automatically.
- ■ Run ten representative tasks and record each actual charge.
- ■ Compare a first request with a repeated request to inspect cache behavior.
- ■ Multiply the average charge by your planned request count, leaving room for retries.
Use CheapRelay's current rate for each category, not the fictional figures here. Sign up for CheapRelay when you are ready to measure a small batch. Expand only after you can explain every line on its bill.
Sign up Try the prices yourself, sign-up credit included.
More reading
| Date | Aisle | Written in | Title |
|---|---|---|---|
| 2026-10-28 | Spend less | EN | $0.0012 for a Tool Loop—With Assumed Rates A beginner’s guide to function calling, tool schemas, repeated context, and keeping a two-request AI workflow within a tiny budget. |
| 2026-10-28 | Spend less | EN | $2.78 for 10,000 Documents: A Lean API Budget A beginner walkthrough for processing 10,000 documents cheaply, with transparent token math, local extraction, a small pilot, and retry controls. |
| 2026-10-28 | Spend less | EN | $0.003 per request: count tokens before sending Estimate input tokens, cap output, and check actual usage with free tools and simple math before spending a tiny API budget. |
| 2026-10-28 | Spend less | EN | A $5 Telegram AI Bot With Pay-Per-Token Billing Build a Telegram AI bot on a tiny budget using CheapRelay, an OpenAI-compatible API, and per-token billing. |
| 2026-10-28 | Spend less | EN | $1 for 1,000 Ticket Summaries: Check the Token Math A beginner’s $1 planning budget for support-ticket summaries: estimate tokens, test a small model, and control retries before processing the queue. |
| 2026-10-28 | Spend less | EN | 8 Million Fewer Tokens From One Prompt Trim Trim a repeated system prompt on a tiny budget, calculate the savings, and check that shorter instructions still produce useful answers. |