Cost engineering · 2026-08-25

Cut your LLM bill: stop paying tokens for boilerplate

Teams optimizing LLM costs usually tune prompts and models first. The bigger lever is usually upstream: what you feed the model. A typical web page served raw carries 40–70% non-content — nav bars, footers, cookie banners, scripts, ads. Every token of that gets processed on every call.

Do the math once

Take an agent that reads 50 pages/day with a 12k-token context window per read:

Same answers, roughly a quarter of the input volume. On any serious monthly bill, that's the difference between a rounding error and a budget line.

Three layers of waste to remove

  1. Markup and chrome — tags, menus, banners, legal boilerplate.
  2. Repetition across reads — the same page fetched twice pays twice; caching fixes this for free.
  3. Wrong pages entirely — crawling without mapping wastes credits on PDFs, tag pages, and pagination shells nobody reads.

The pipeline that fixes it

# Clean markdown only (boilerplate stripped at the edge)
POST /api/v1/scrape  {"url": "...", "onlyMainContent": true}

# Repeat reads come from cache in milliseconds — free
POST /api/v1/scrape  {"url": "...", "maxAge": 3600}

The counterintuitive part

Cheaper inputs aren't just cheaper — they're better. Models attend to signal, not noise; stripped, structured input measurably improves extraction accuracy and reduces hallucinated details. Cost optimization and quality optimization point the same direction here.

Clean markdown, edge caching, monitors — included on every plan, from $0.

Start free