We burned 1.5B OpenAI tokens — here's the postmortem that cut our API bill 65%
Careful-Key-1958 · reddit · 2026-09-19
Borut, founder of Rankpilot.dev, shares a postmortem after his team processed 1.5 billion OpenAI tokens in a month, ending with 65% lower monthly costs, faster responses, and better output quality.
- Measure before optimizing: everything ran through one API key, so they couldn't see which feature was burning money; they now tag every call by feature and log tokens/cost per feature.
- Half the "AI" calls didn't need AI: regex/parser checks (e.g., title tag length) run first; only fuzzy questions like tone or intent matching go to the model, removing 5% of calls.
- Model cascade: a small model answers first with a confidence flag; only 5% of requests escalate to the expensive model.
- Content hashing: pages are re-analyzed only when their cleaned content hash changes — one of the biggest wins.
- Trim inputs: strip nav bars, cookie banners, footers and scripts; keep only main content with a size cap.
- Small eval set: 20 hand-checked examples run before every model/prompt change; twice this caught cheaper setups that quietly degraded.
- Fix double billing: timeout retries were resending full requests while originals kept billing; idempotency keys, exponential backoff, and retry caps fixed it.
More from coding & agent
- Hindsight ships 0.8B model for agent memory decisions: 2.5x cheaper, 1.9x faster — victor_explore · 2026-11-04
- Human Oversight Is 70-75% of AI Agent Costs in Banking, McKinsey Finds — mikeflache · 2026-11-04
- Over 80% of Major Financial Institutions Now Run Agentic AI in Production — mikeflache · 2026-11-04
- Mnemos MCP nears launch after shared memory layer fix — RileyRalmuto · 2026-11-04
- Moving mobile dev to remote machines makes it multiplayer across product, design, engineering — rudrank · 2026-11-04
- Kuaishou's EvoRec: self-evolving agentic recommender lifts ad revenue 4.6% — _reachsumit · 2026-11-04