Jump straight to the numbers

← All articles

¥20 Buys a Real Prompt-Cache Test

01 / Start With a ¥20 Prompt-Caching Budget

Prompt caching sounds technical, but the useful question is simple: can repeating the same long instructions cost less than sending them from scratch every time? With a tiny budget, you can test that without guessing. Set aside ¥20, treat it as a hard ceiling, and record every request.

CheapRelay is a pay-as-you-go AI API relay with no monthly fee and no subscription. One key can reach services including Claude, GPT, Gemini, DeepSeek, Kimi, GLM, Qwen, Grok and more. Its billing counts real tokens, including cache writes and cache reads, so a cached request is not automatically free.

02 / Separate the Three Token Charges

Every caching experiment has three costs to understand. A normal input token is processed without a cache. A cache write stores a reusable prefix and has its own charge. A cache read reuses that stored prefix and also has its own charge. Output tokens remain a separate part of the bill.

Write this formula in your notes:

Total cost = normal input cost + cache write cost + cache read cost + output cost.

The exact yuan amount depends on the model and the current rate shown for your route. Do not copy a price from a random screenshot. Check the rate in your CheapRelay account or billing records before calculating.

03 / Build One Reusable Prompt Prefix

Use a stable block of text at the beginning of every request. For example, put your project rules, file conventions, response format, and a small reference document in the prefix. Put the changing question after it.

A practical beginner test might use a 10,000-token prefix and five questions. The first request creates the cache. The next four requests reuse it. Keep the changing part short, because caching only helps when the repeated portion is large enough to justify its write and read charges.

  • ■ Stable prefix: project rules and reference material.
  • ■ Variable suffix: today’s question or task.
  • ■ First request: expect a cache write.
  • ■ Later requests: expect cache reads if the prefix matches.

04 / Use a Receipt-Style ¥20 Ledger

Suppose you begin with ¥20. Reserve ¥5 for setup and mistakes, leaving ¥15 for the actual comparison. Do not treat these as advertised model prices; they are spending limits for your experiment.

  • ■ Opening balance: ¥20.00
  • ■ Setup reserve: ¥5.00
  • ■ Test allowance: ¥15.00
  • ■ After a ¥2.40 first request: ¥17.60 remains
  • ■ After four ¥0.35 follow-up requests: ¥16.20 remains

The arithmetic is deliberately ordinary: ¥2.40 + (4 × ¥0.35) = ¥3.80 spent. Your actual receipt may be higher or lower because token rates, prefix length, output length, and cache behavior differ. The point is to compare your recorded charge with the request shape, not to assume that every repeated prompt gets the same price.

05 / Check That the Cache Is Actually Reused

Send the same prefix twice, changing only the final question. Then inspect the usage fields returned by your client or the billing page. Look for cache-write and cache-read token counts. If the second request reports zero cache-read tokens, the prefix may have changed, the cache window may have expired, or the route may not have matched the request as expected.

For a clean test, keep whitespace, punctuation, system instructions, and tool definitions identical. Changing one character can prevent a reusable prefix from matching.

06 / Choose a Small, Repeatable Workflow

For a first trial, use one model and one task family. Claude Haiku 4.5 is a reasonable example for a small experiment, but the correct choice depends on the response quality you need and the rate currently displayed for your account. Send five or ten related requests, then compare total yuan spent with a second run that does not reuse the prefix.

Do not assume caching saves money after one request. The write charge and the repeated read charges must be recovered by enough reuse. A 500-token prefix used twice may not justify caching; a 10,000-token prefix used dozens of times may be a better candidate.

07 / Connect Your Existing Client Through CheapRelay

CheapRelay provides the API base https://api.cheapapirelay.com. OpenAI-compatible routes are under /v1, and Gemini native routes are under /v1beta. That makes the experiment usable from an OpenAI SDK, Claude Code, Codex, Gemini CLI, or another compatible client, provided your client sends caching fields in the format required by the selected provider.

Before spending more than ¥20, verify the model name, cache support, token counts, and current billing rate. Sign up for CheapRelay once you are ready to run the ledger test, then stop when the remaining balance reaches your chosen limit.

08 / Decide With Cost Per Useful Request

At the end, calculate one number: total yuan spent divided by useful completed requests. Include failed requests and setup charges in your notes. If the cached run costs ¥8 for ten useful answers and the uncached comparison costs ¥11, caching saved ¥3 in that specific workflow. If it costs more, keep the prefix shorter or skip caching.

Prompt caching is a billing optimization, not a guarantee. Measure cache writes, cache reads, output tokens, and the final yuan receipt together. A ¥20 test is enough to replace assumptions with evidence.

Sign up Try the prices yourself, sign-up credit included.

More reading

DateAisleWritten inTitle
2026-10-27Spend lessEN$2 for a Small RAG App, With a Stop at $1.90
Build a tiny document Q&A app with local retrieval, bounded prompts, and a prepaid request ledger that stops spending before your $2 ceiling.
2026-10-27Spend lessEN$10 a Month Is a Budget, Not a Chatbot Guarantee
Build a low-budget support chatbot with token math, narrow answers, short context, spending limits, and a clear handoff to a human.
2026-10-27Spend lessENA 10,000-Token Bill, Line by Line
A beginner-friendly guide to input, output, cache writes, and cache reads when every token matters.
2026-10-27Spend lessEN$0.024 a Request: Read the Whole Token Price
A tiny-budget guide to input, output, cache charges and retries, with sample math for turning per-million-token prices into real costs.
2026-10-27Spend lessEN$3.06 to Tag 100,000 Feedback Messages—On Paper
A hypothetical token receipt for feedback tagging, with retries, human review, and the assumptions that can break a cheap classification budget.
2026-10-27Spend lessEN$0.13 per Active User: An AI Feature Cost Receipt
A concrete AI cost receipt: tokens, retries, infrastructure, and the difference between a $0.08 API bill and a $0.13 user budget.