What this guide covers
This guide brings together three practical cost questions. The price-per-use-case table compares representative workloads across major commercial models. The context-window article explains why a published limit is not always a usable limit. The long-context analysis compares full-context requests with retrieval-based approaches.
Pricing by workload
-
AI cost per task: explicit chat, retrieval, document, and agent scenarios
Computed workload examples with stated usage, current rates and clear boundaries for caching, retrieval, batch work, media and self-hosting.
-
AI API price history
Providers rewrite pricing pages and old numbers vanish. benchr's append-only log keeps every verified price, change, and sunset — dated, source-linked, and downloadable as open data under CC BY 4.0.
Context-window economics
-
AI context windows compared: input limits, output budgets, and evaluation
Compare exact context, input and output limits for selected APIs, understand request budgets, and test long-context evidence without invented quality zones.
-
Long context vs retrieval: evidence, cost, and architecture tradeoffs
Compare direct-context, retrieval and hybrid document workflows with explicit token-cost scenarios, evaluation requirements and operational tradeoffs.
When to skip the frontier entirely
-
RAG vs fine-tuning: diagnose evidence and behavior failures
Choose retrieval, direct context or training from reproducible failures, with an inspectable search example, evaluation design and hosted-training limits.
-
Small language models, in working use
Phi-4 mini, Gemma 3 4B, and a workload-specific framework for evaluating sub-10B models.
The cost discipline that works
Three controls can make production AI spending easier to predict.
One: constrain output. Cap max-tokens. Force structured formats. Instruct "no preamble" and trim everywhere. Output is where the money goes. See the prompt-engineering piece for the techniques.
Two: cache repeated prefixes. Anthropic, Google, and OpenAI support prompt caching, with some cached-input rates near 10% of standard input pricing. If the same system prompt appears on every call, compare the cache rules and effective rate for your chosen model.
Three: route by workload. A small local model may suit classification, while a hosted mid-tier model may suit routine generation. Reserve more expensive models for tasks where your evaluations show a useful gain. The comparison tool helps estimate the trade-offs.
At September 2026 rates, a volume lane might start with GPT-5.6 Luna ($0.20 input / $1.20 output per 1M tokens) or Gemini 3.8 Flash ($0.75 / $3.75 through December 31, 2026, then $1.50 / $7.50 from January 1, 2027), and a default lane with Claude Sonnet 5 ($2 / $10) or GPT-5.6 Terra ($2 / $12). GPT-6 Astra and Claude Fable 5.1, both $10 / $50, belong on the calls where your tests show the ceiling is needed. Treat these as editorial starting points, not measured results.