ailearnist Loading…
Agents, Reliability & Cost · Beginner

LLM Cost Estimator

Estimate monthly API spend from request volume, prompt size and output length — and compare models.

Monthly cost Model comparison Caching savings

Your workload

Prompt caching bills a repeated prompt prefix (e.g. a long system prompt) at a discount — set what share of input tokens repeat.

Estimated cost

0tokens / month
–cheapest tier / month
–frontier vs small
Model tier$ in / 1M$ out / 1MPer requestPer month

Prices are editable example tiers — paste your provider's current rates into the table. Cached input is billed at 10% of the input price.

Five ways to cut LLM spend

  • Route by difficulty: send easy requests to a small model, hard ones to a frontier model — usually the biggest lever.
  • Trim the prompt: long system prompts and stuffed RAG context are paid on every call. Retrieve fewer, better chunks.
  • Cap the output: set max_tokens and ask for concise formats — output tokens cost more than input.
  • Cache repeated prefixes and identical answers (semantic caching).
  • Watch agents: every reasoning step is another call — limit steps and log tokens per task.