Guide · Decision

Build or Buy LLM Cost Tracking: the Weekend Is Not the Cost

By Ghiles Asmani, founder of Weckr · Published August 15, 2026

Short version: the v1 you are imagining, log tokens, multiply by prices, chart it, is a real weekend and we will not pretend otherwise. The cost is the tail: prices that move under you, cache math, the revenue join that turns cost into margin, pre call enforcement with correct failure behavior, and velocity detection with alerting. Build if compliance or a truly unusual billing model demands it; otherwise this is classic undifferentiated plumbing. We sell the buy option, so audit our reasoning, every claim below is checkable.

What the weekend version gets you, and where it stops

Day one DIY: read the usage object, store tokens with a user id, multiply by a hardcoded table, aggregate in a dashboard. Genuinely fine, and if you stop at “roughly what does this cost”, it may be enough. It stops being enough at four specific doors:

  • The price table rots. Providers reprice without ceremony, an 80 percent cut in July 2026 among them, per LLM price history. A stale table silently corrupts every downstream number. We run a watched live price feed as infrastructure just for this input; DIY inherits that job manually.
  • Cache math is not optional. Cached input bills at roughly a tenth of fresh, and Anthropic adds a write premium, per prompt caching economics. Ignore cache fields and heavy caching apps overstate costs badly enough to mislead pricing.
  • Cost is not margin.The decision question is cost against what each user pays, which means joining billing data per user, continuously. This join is most of Weckr’s data model and most of what DIY versions never get to.
  • Dashboards cannot enforce. Caps that block or downgrade need a pre call check that is fast, cached, and fails open on outages, and runaway detection needs velocity windows and alert delivery, per the runaway flow. This is a service, not a cron job.

The honest build cases

Build when data residency or compliance forbids third parties even for metadata, when your billing model genuinely fits no tool (true usage marketplaces, exotic revenue shares), or when this tooling is your strategic moat. Those are real, and if you are in one, our how to articles document the patterns freely, build well. For everyone else, the equation is an engineer weekend plus a permanent maintenance tax versus free for 50,000 requests and $49 for enforcement, and plumbing you maintain is time your product does not get.

FAQ

Should I build LLM cost tracking myself or use a tool?

The v1 build is genuinely easy, a weekend: log tokens with a user id, multiply by a price table, aggregate. The honest case for buying is everything after the weekend: keeping prices current as providers reprice, cache aware cost math, margin requires joining billing data, caps require a pre call enforcement path with correct fail open behavior, and runaway detection requires velocity windows and alerting. Each is straightforward; together they are a part time job that is not your product.

What does the DIY version usually miss?

Four things, in the order they bite: stale prices (a provider cut or hike silently corrupts every number, one 2026 cut moved a model 80 percent), cache token math (cached input bills at roughly a tenth of fresh, ignore it and costs overstate), the revenue join (cost per user without plan price answers the wrong question), and enforcement (a dashboard cannot stop a runaway at 2am; a pre call cap can).

What is the real ongoing cost of the DIY route?

Price table maintenance against every provider’s changes, model launches, and cache rule updates; schema and dashboard upkeep; alerting infrastructure; and the correctness tax, your billing math needs tests, since a wrong price table quietly misleads pricing decisions. Weckr runs an automated weekly watcher plus a live price feed just to keep this one input honest, which is a hint about the true workload.

When is building actually the right call?

Legitimately: when cost data must stay entirely in your infrastructure for compliance, when your billing model is so unusual that no tool’s data model fits, or when LLM cost tooling is strategically core to your company. For a typical SaaS adding AI features, none of these hold, and the build is undifferentiated plumbing with a maintenance tail.

What does the buy option cost by comparison?

Weckr’s free tier covers 50,000 requests a month with the core margin tracking, and Pro is $49 a month with caps, loop detection, and alerts. Against an engineer’s weekend plus a recurring maintenance tax, the honest arithmetic rarely favors building for the standard case, which is exactly why we could build it once and offer it this cheap.

Keep reading

Try the bought version in the time the spec meeting takes

The integration is ten minutes and the free tier means the trial costs nothing but the wrapper. If it does not answer your margin questions better than the weekend plan would, build with our blessing, the demo at useweckr.com/demo will at least show you the target.

See the dashboard with real data, no signup needed.

Try the demo →