Jump straight to the numbers

← All articles

$0.0685 and $0.195: two shell-chore receipts

01 / Two illustrative receipts, not a measured showdown

$0.0685 for one run and $0.195 for the other: those are the totals in this worked example. They are not measured Gemini CLI or Claude Code bills. Every token count and unit price below is an explicit accounting assumption, not a current CheapRelay price quote. The point is to show what a useful receipt should contain before you spend money comparing tools.

The example pairs Gemini CLI with Gemini 2.5 Flash and Claude Code with Claude Haiku 4.5. A CLI is not a price tier: the selected model, accumulated context, output and caching behavior determine the API charge. Neither total establishes that one tool is cheaper on real work.

02 / The shared job: inspect, patch and verify one script

Give both tools the same repository snapshot and the same request: inspect a shell script that mishandles filenames containing spaces, patch its quoting, add a regression test and run the existing checks. Keep the working directory, permissions and available commands identical. Require a final explanation of the change and test results.

For a fair trial, use separate clean worktrees. Do not let the second tool inherit the first tool’s patch. Check the resulting diff and test exit status yourself. A small bill for an incorrect patch is not a bargain.

Our illustrative ledger assigns both runs 100,000 uncached input tokens, 200,000 cache-read tokens, 20,000 cache-write tokens and 10,000 output tokens. These are aggregate quantities across requests, not the size of one prompt. Actual tools may produce very different totals.

03 / Receipt A: Gemini CLI totals $0.0685

For arithmetic only, assume rates of $0.30 per million uncached input tokens, $0.03 per million cache-read tokens, $0.375 per million cache-write tokens and $2.50 per million output tokens. These assumptions are not advertised model rates.

  • ■ Uncached input: 100,000 ÷ 1,000,000 × $0.30 = $0.0300.
  • ■ Cache reads: 200,000 ÷ 1,000,000 × $0.03 = $0.0060.
  • ■ Cache writes: 20,000 ÷ 1,000,000 × $0.375 = $0.0075.
  • ■ Output: 10,000 ÷ 1,000,000 × $2.50 = $0.0250.
  • ■ Total illustrative API cost: $0.0685.

04 / Receipt B: Claude Code totals $0.195

Now assume $1.00 per million uncached input tokens, $0.10 per million cache-read tokens, $1.25 per million cache-write tokens and $5.00 per million output tokens. Again, these are example inputs, not a live tariff.

  • ■ Uncached input: 100,000 ÷ 1,000,000 × $1.00 = $0.1000.
  • ■ Cache reads: 200,000 ÷ 1,000,000 × $0.10 = $0.0200.
  • ■ Cache writes: 20,000 ÷ 1,000,000 × $1.25 = $0.0250.
  • ■ Output: 10,000 ÷ 1,000,000 × $5.00 = $0.0500.
  • ■ Total illustrative API cost: $0.1950.

The difference is $0.1265. Because we deliberately held token quantities constant, that difference reflects only the assumed rates. It says nothing about task speed, patch quality or how many retries either tool would need.

05 / Replace four assumptions before trusting either total

Export actual usage for every request, including failed attempts and retries. Record the model identifier and the applicable prices at the time of the run. Treat cache categories according to the billing schema: do not count the same input tokens once as ordinary input and again as cached input.

Do not assume both tools support identical cache behavior or expose identical usage fields. If a category is unavailable, mark it unknown rather than silently entering zero. The totals above cover API usage only, excluding your review time and local execution costs.

06 / Keep the relay bill separate from the tool choice

CheapRelay supports Claude Code and Gemini CLI with one key and pay-as-you-go billing per real token, including cache reads and writes. There is no monthly fee or subscription. Its API base is https://api.cheapapirelay.com, with OpenAI-compatible routes under /v1 and Gemini-native routes under /v1beta; use the route and configuration appropriate to your client.

Sign up for CheapRelay to run your own small, capped comparison, checking current rates first. Keep both receipts beside the accepted patches. The useful number is the actual cost of a verified result, not the cheapest-looking hypothetical total.

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

More reading

DateAisleWritten inTitle
2026-10-26Coding agents, cheaplyEN$0.1325 for a focused Codex run: a sample receipt
A worked Codex receipt shows how tighter scope, smaller tool output, and deliberate stopping points can reduce token spending.
2026-10-26Coding agents, cheaplyEN$2.28 for 100 Code Reviews: An Illustrative Receipt
A transparent token-cost receipt for 100 AI-assisted code reviews, with retry costs, spending limits, and a workflow that keeps context small.
2026-10-26Coding agents, cheaplyEN$1.50 a Day Just to Repeat Your Agent’s Memory
A token-by-token receipt for coding agent memory files, with hypothetical rates, cache math, and a practical way to measure the trade-off.
2026-10-26Coding agents, cheaplyEN$0.84 Saved by Clearing Unrelated Claude Code Tasks
A worked Claude Code token receipt: when /clear saves money, what /compact costs, and why cache billing can change the result.
2026-10-26Coding agents, cheaplyEN$13 of Usage, $7 of Headroom: A Tiny-Team AI Receipt
A three-developer coding assistant budget with token math, cache charges, shared configuration, and safeguards against surprise spending.
2026-10-26Coding agents, cheaplyEN$0.37 for an OpenCode Session: An Example Receipt
A worked OpenCode cost receipt: input, output, cache reads and writes, plus practical checks before using a pay-per-token backend.