Guides
Spend less on LLM APIs without changing what users see.
Practical guides to cut OpenAI, Anthropic and Claude Code costs: prompt caching, agent loops, retries, cut-off answers and cost monitoring.
Start here · 4 min read
How to reduce your LLM API costs
A practical checklist to cut OpenAI and Anthropic API costs: find the waste first, then fix caching, loops, retries, output limits and model choice.
Prompt caching with OpenAI and Anthropic
How prompt caching works on OpenAI and Anthropic, how to structure prompts so the cache hits, and how to check from token counts that it is working.
3 min read
AI agent loops: how to find and stop them
Why AI agents get stuck repeating the same step, what it costs, how to detect a loop from call data, and the guards that stop it.
3 min read
Retries and cut-off answers
What LLM retries and answers cut off at max_tokens really cost, how to spot them from finish_reason and status codes, and how to fix both.
2 min read
Claude Code cost tracking
Track Claude Code usage and cost per developer, model and repository with its built-in OpenTelemetry export. Setup in five environment variables.
2 min read
LLM cost monitoring: what to measure
What to measure to control LLM costs, the three ways to collect it (provider dashboards, a proxy, an SDK), and how to do it without storing prompts.
2 min read