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
- Grok Build tests Remote Control: link your PC via CLI and drive it from your phone — XFreeze · 2026-09-19
- Developer Says AI Models Now Handle Nearly All His Work — He Just Approves — tushaarmehtaa · 2026-09-19
- 8 components of harness engineering: why the system around the model, not the model, makes agents reliable — blaizedsouza · 2026-09-19
- Google's 12-page Agentic Engineering guide lays out a 5-stage pipeline for building agent teams — blaizedsouza · 2026-09-19
- AgentRun: a purpose-built harness for high-frequency repetitive knowledge work — blaizedsouza · 2026-09-19
- Qwen 3.8 27B on a single RTX 5090 builds a full animation using only code — Acceptable-Object390 · 2026-09-19