Jump straight to the numbers

← All articles

A $8.40 Receipt for One Developer's AI Notebook

01 / The receipt: one developer, one private knowledge base

A personal knowledge base chatbot does not need a team budget. One developer can index project notes, architecture decisions, code explanations, incident records, and saved documentation, then ask questions through a small retrieval-augmented generation application.

The important cost question is not “Which model is cheapest?” It is “How many tokens will this workflow actually consume?” The following is a worked monthly receipt for a small, actively used system. The dollar rates are illustrative planning numbers, not a quoted CheapRelay tariff. Check the current model rate before running a paid workload.

  • ■ Document indexing: 1,800,000 input tokens at $0.80 per million: $1.44
  • ■ Indexing output and metadata: 450,000 output tokens at $4.00 per million: $1.80
  • ■ Question answering: 1,200,000 input tokens at $0.80 per million: $0.96
  • ■ Question answering: 240,000 output tokens at $4.00 per million: $0.96
  • ■ Cache writes: 600,000 tokens at $0.80 per million: $0.48
  • ■ Cache reads: 2,400,000 tokens at $0.08 per million: $0.19
  • ■ Retrieval service and local storage: $0 in this example, because the data stays on the developer’s machine

Sample total: $5.83. Add a 44% contingency for re-indexing, longer answers, and experiments, and the working budget becomes $8.40. That is the number I would put on the receipt for a first month: $8.40, before any applicable taxes or provider-specific charges.

02 / What the chatbot actually stores

The useful version is not a giant prompt containing every file. A local index stores document chunks, titles, paths, timestamps, and embeddings. When a question arrives, the application retrieves perhaps 8 to 12 relevant chunks and sends only that context to the language model.

For a small codebase, I would start with 300 Markdown files, 80 design notes, 40 incident reports, and selected source-code explanations. Assuming an average chunk size of 700 tokens, 2,000 chunks represent about 1.4 million tokens before metadata and retries. That is large enough to be useful and small enough to inspect.

03 / Where the tokens disappear

Indexing is a periodic expense. Querying is the recurring expense. A developer asking 20 questions per workday for 22 days creates 440 questions per month. At roughly 2,700 input tokens and 550 output tokens per question, that is 1,188,000 input tokens and 242,000 output tokens.

The hidden line items are repeated instructions and stable context. A system prompt, repository rules, and user preferences might add 1,000 tokens to every request. Prompt caching can reduce the effective cost of repeated content, but cache reads and cache writes are still real billable token events. CheapRelay describes billing as per real token, including cache reads and writes, so the receipt should track those categories instead of treating caching as free.

04 / A practical model split for one person

I would use Claude Haiku 4.5 for routine summarization, chunk labeling, and short factual answers. Reserve DeepSeek V4 Flash for larger repository questions or experiments that need more context. The exact split should follow the current rates and response quality you observe; the receipt above is a planning model, not a performance claim.

CheapRelay gives one API key access to multiple model families through an OpenAI-compatible API base at api.cheapapirelay.com, with routes under /v1. That makes a small Python, Node.js, or OpenAI SDK client easy to switch between models. Gemini-native applications can use the /v1beta route. There is no monthly fee or subscription, so an idle personal project does not create a standing platform charge.

05 / The budget controls I would ship first

  • ■ Set a hard monthly spending limit of $10.
  • ■ Reject retrieved context above 12,000 tokens.
  • ■ Limit generated answers to 900 tokens unless the user explicitly requests detail.
  • ■ Log input, output, cache-read, and cache-write tokens per request.
  • ■ Re-index only changed files instead of rebuilding the entire collection.
  • ■ Keep source documents local and send only retrieved excerpts.

That produces a personal assistant with a measurable cost boundary rather than an open-ended AI bill. For access to the relay, sign up for CheapRelay once, then start with a small token budget and compare the receipt against your own request logs.

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

More reading

DateAisleWritten inTitle
2026-10-27Cheap how-tosEN$0 monthly fee: your first curl chat request
Send an OpenAI-compatible chat request with curl, read the response, and keep a tiny API budget under control.
2026-10-27Cheap how-tosENA $140 API Bill Cut to $40 by Sending Less
An illustrative token receipt shows how removing unnecessary user data saves $100 across 10,000 requests without shrinking useful answers.
2026-10-27Cheap how-tosEN$660.27 for a Prompt Style Guide: The Receipt
A six-person team's illustrative prompt style guide budget, token bill, maintenance cost, and break-even math—with assumptions exposed.
2026-10-27Cheap how-tosEN$8.46 a Month to Retire a Hobby App’s Free Tiers
A worked hobby-app budget covering compute, storage, traffic and AI tokens, with clear assumptions and practical spending controls.
2026-10-27Cheap how-tosEN$0.04 for 100 AI calls: an illustrative receipt
A beginner’s AI API guide with an illustrative four-cent receipt, token math, setup steps, and practical spending controls.
2026-10-27Cheap how-tosEN$0.036 for 200 Textbook Flashcards: A Sample Receipt
A transparent token budget for turning textbook excerpts into 200 flashcards, with review costs, pricing assumptions, and quality checks.