Engineering guides

Practical guides for shipping LLMs.

Engineering-grade guides on LLM API costs, optimization strategies, and provider migration — written for teams running real workloads at scale. Updated regularly against official provider pricing and API documentation.

How to Read LLM API Pricing Pages Without Getting Burned
Decode per-token units, input/output asymmetry, prompt caching rates, batch discounts, and hidden fees before they show up on your invoice.
9 min read
Batch API: The 50% LLM Discount You're Probably Not Using
What batch processing is, which providers offer it, when it applies, and the exact dollar savings at 10K, 100K, and 1M jobs per month.
10 min read
Prompt Caching ROI: When Anthropic's 90% Discount Actually Pays Off
Cache write vs read pricing, ephemeral vs extended lifetimes, break-even math, and a worked example showing $400/month saved on a single system prompt.
11 min read
5 Token Counting Myths That Cost Engineering Teams Real Money
Why "1 token = 4 chars" is wrong for code, why Claude and GPT tokens aren't interchangeable, and why output tokens are more expensive than input tokens.
9 min read
Migrating from OpenAI to Anthropic Without Breaking Production
SDK swap, request/response shape changes, prompt conventions, tool use format, streaming events, caching wiring, and a safe gradual rollout pattern.
12 min read
Cheapest LLM API in 2026 — workload-by-workload
Concrete recommendations for the 7 most common LLM workloads in 2026 (chat, RAG, code, classification, long documents, batch analytics, embeddings) — with batch + cache modeling applied.
8 min read
Claude Haiku 4.5 vs GPT-5.4 mini: production decision framework
Six concrete decision rules for picking between the two cheap workhorses — caching, function calling, SDK fit, multilingual quality, latency variance, long context.
7 min read
How to Estimate the Cost of an AI Feature Before You Build It
Turn a vague "how much will this cost?" into a defensible monthly number with a low/expected/high range — token buckets, real 2026 rates, the caching and batch levers, and the buffers every team forgets.
11 min read
How to Cut LLM Output Token Costs: 9 Techniques That Actually Work
Output tokens are 5–6× the price of input and usually dominate the bill. Nine practitioner techniques ranked by effort vs payoff — caps, structured outputs, early-stop streaming, model routing, and more.
10 min read
RAG Cost Architecture: Where the Money Actually Goes in 2026
Embeddings, retrieved-context bloat, synthesis, reranking — most teams optimize the wrong one. Every RAG cost center broken down with the highest-leverage fixes and a worked monthly example.
12 min read
Self-Hosting Open-Weight LLMs vs API Pricing: The 2026 Break-Even
When does renting a GPU actually beat paying per token? An honest break-even covering the costs teams forget — utilization, ops, idle GPU time — and why hosted APIs usually win below a volume threshold.
12 min read
LLM Cost Monitoring and Alerting: A Practical Setup
A vendor-neutral setup for tracking token spend per feature and per customer, catching the output-token spikes that blow budgets, and never being surprised by an invoice again.
10 min read

Want these ideas applied end to end? Read the worked migration reports — real workloads costed across every model with the GO/NO-GO call spelled out. Looking for model cost comparisons? See the Claude Opus 4.7 vs GPT-5.5 comparison or use the token counter to measure your actual prompt sizes.