AI infrastructure & agent explorers

LLM Cost Explorer

Monthly LLM API cost per model for your workload, with prompt-caching and batch savings.

Model prices (USD per 1M tokens)
Model prices (USD per 1M tokens)
#ModelInputOutputCache readCache writeContext window
1
2
3
4

e.g. openai/gpt-4o-mini – one per line. Empty in paste mode = all pasted models.

tokens
tokens
%

Share of input tokens that repeat across requests (system prompt, tools, documents).

%
%
%
USD

Try an example: Support bot: 5,000 requests/day, cached system prompt (example prices you entered) · RAG workload on real OpenRouter prices (pasted snapshot 2026-10-14)

How it works

Calculates what an LLM workload costs per request and per month on each model – requests per day, input and output tokens, the share of the prompt that can be cached, cache hit rate and batch discounts – using live prices from OpenRouter's public models API, a pasted copy of it, or prices you enter. Shows caching and batch savings, the cheapest models that fit your context and budget, and a cost comparison chart.

  • Per request: input cost = uncached tokens × input price + cacheable tokens × (hit rate × cache-read price + (1 − hit rate) × cache-write price); output cost = output tokens × output price. Prices are per 1M tokens.
  • If a model has no cache-read price, caching is not modelled for it (all input at the normal input price). If no cache-write price is listed, misses are charged at the normal input price.
  • Batch: the batch share of requests gets the batch discount on the whole request (as with typical 50 % batch APIs).
  • Monthly = per request × requests/day × days per month (default 30.4). Context check: input + output tokens must fit the context window when it is known.
  • OpenRouter prices come from GET https://openrouter.ai/api/v1/models (pricing.prompt, completion, input_cache_read, input_cache_write in USD per token).

For scripts and AI agents

  • JSON API: POST https://llmcostexplorer.usefulweb.site/api/v1/calculate (same calculation as this page)
  • Interface description: OpenAPI 3.1 · AI guide: llms.txt
  • MCP server (Streamable HTTP): https://llmcostexplorer.usefulweb.site/mcp · tool name llm_cost_explorer
Example request
curl -s -X POST https://llmcostexplorer.usefulweb.site/api/v1/calculate \
  -H 'content-type: application/json' \
  -d '{"priceSource":"manual","prices":[{"model":"Large model (example)","inputPerM":3,"outputPerM":15,"cacheReadPerM":0.3,"cacheWritePerM":3.75,"contextTokens":200000},{"model":"Mid model (example)","inputPerM":0.4,"outputPerM":1.6,"cacheReadPerM":0.1,"contextTokens":1000000},{"model":"Small model (example)","inputPerM":0.1,"outputPerM":0.4,"contextTokens":8000}],"requestsPerDay":5000,"inputTokens":12000,"outputTokens":400,"cacheablePct":75,"cacheHitRate":90,"budget":2000}'

Related tools

Feedback