LLM cost is measured in dollars per million tokens (input + output). Frontier models (GPT-4o, Claude Sonnet, Gemini Pro) offer highest quality at ~$2-15/M tokens. Economy models (GPT-4o-mini, Claude Haiku, Gemini Flash) offer 80-90% quality at 1/10th the price. Latency: economy models are also 2-5x faster. The optimal strategy: use economy models as default, route complex tasks to frontier, implement prompt caching for repeated contexts.
Structuring prompts to maximise cache hit rate.
GPT-4o-mini and Claude Haiku handle summarisation, classification, extraction, and light reasoning at 85-90% quality for 1/10th the price. Start with economy, escalate on failure.
If your system prompt is 2000 tokens and you make 100k requests/day, caching saves 2000 tokens × 100k requests × $0.0025 = $500/day. Structure prompts with static content first.
Batch document processing, report generation, and evaluation runs don't need sub-second responses. Batch API (50% discount) + prompt caching can reduce costs by 70-90% for offline workloads.
Sign in to share your feedback and join the discussion.