# LLM Cost Explorer > Monthly LLM API cost per model for your workload, with prompt-caching and batch savings. 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. Part of usefulweb.site (https://usefulweb.site/). Results are deterministic calculations from the inputs and the listed assumptions; the API returns exactly what the web page shows. ## Use it - Human interface: https://llmcostexplorer.usefulweb.site/ (interactive tool at https://llmcostexplorer.usefulweb.site/tool) - JSON API: POST https://llmcostexplorer.usefulweb.site/api/v1/calculate with a JSON object of inputs (schema: https://llmcostexplorer.usefulweb.site/api/v1/tool) - OpenAPI: https://llmcostexplorer.usefulweb.site/openapi.json - MCP (Streamable HTTP): https://llmcostexplorer.usefulweb.site/mcp - tool `llm_cost_explorer` ## Inputs - priceSource (select): Prices from - prices (table): Model prices (USD per 1M tokens) - modelIds (list): OpenRouter model ids - e.g. openai/gpt-4o-mini – one per line. Empty in paste mode = all pasted models. - modelsJson (textarea): OpenRouter models JSON - requestsPerDay (number, required): Requests per day - inputTokens (integer, required): Input tokens per request - outputTokens (integer, required): Output tokens per request - cacheablePct (number): Cacheable prompt prefix - Share of input tokens that repeat across requests (system prompt, tools, documents). - cacheHitRate (number): Cache hit rate - batchSharePct (number): Share of requests sent via batch API - batchDiscountPct (number): Batch discount - daysPerMonth (number): Days per month - budget (number): Monthly budget (optional) ## Method - 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).