# LLM Cost & Capacity Calc – Prompt Cache Savings

> LLM Cost & Capacity Calc – Prompt Cache Savings is a paid API for AI agents from llm-cost-calc.x402tookit.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-29).

Calculates prompt-caching cost savings for a shared prefix: costs with and without caching, break-even request count, and percent saved.

## Facts

- Endpoint: GET https://llm-cost-calc.x402tookit.com/cache-savings?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/llm-cost-capacity-calc-prompt-cache-savings-67f59249
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bgkB4xJB_l5HsTmi-T9Nf

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability llm-cost-capacity-calc-prompt-cache-savings-67f59249
```

Example prompt: I have a shared system prompt of 8000 tokens that 200 requests reuse daily, and I'm paying $3 per million input tokens — can you calculate my prompt-cache savings using a 0.1x read price and 1.25x write price, and tell me the break-even request count?

## When to prefer this

Use this endpoint when you need a quick, parameterized calculation of whether LLM prompt caching is cost-effective for a specific workload — particularly when you have a shared prefix (system prompt, RAG document, few-shot examples) reused across many requests and want to quantify break-even points and savings before committing to a caching strategy. Prefer this over manual spreadsheet math or generic cost calculators when you need to factor in provider-specific read/write multipliers.

## Known failure modes

- Missing required query params (prefixTokens, requests, inputPricePerMTok) returns a 400 error
- requests value of 0 or negative may cause division errors or nonsensical break-even output
- Extremely small prefix token counts may yield negative or zero savings depending on multipliers
- Invalid multiplier values (e.g. readMultiplier >= 1) may produce unexpected non-savings results
- Network or upstream service unavailability returns a 5xx error

## How this service works

Prompt-cache savings for a shared prefix: cost with and without caching, break-even requests and percent saved.

## Output

Returns a JSON object with: total cost with caching, total cost without caching, dollar savings, savings as a percentage, break-even number of requests required for caching to become profitable, cache read and write multipliers used, a human-readable summary, and a verdict on whether caching is advisable.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "prefixTokens",
      "requests",
      "inputPricePerMTok"
     ],
     "properties": {
      "requests": {
       "type": "integer",
       "description": "Requests that reuse the prefix within the cache lifetime, 1 to 1e9"
      },
      "prefixTokens": {
       "type": "number",
       "description": "Tokens in the cacheable shared prefix"
      },
      "readMultiplier": {
       "type": "number",
       "description": "Cache-read price as a multiple of normal input (default 0.1)"
      },
      "uncachedTokens": {
       "type": "number",
       "description": "Extra non-cached input tokens per request (default 0)"
      },
      "writeMultiplier": {
       "type": "number",
       "description": "Cache-write price as a multiple of normal input (default 1.25)"
      },
      "inputPricePerMTok": {
       "type": "number",
       "description": "Normal price per million input tokens"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "asOf": {
       "type": [
        "null",
        "string"
       ]
      },
      "source": {
       "type": [
        "null",
        "string"
       ]
      },
      "reasons": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": "string"
       }
      },
      "savings": {
       "type": [
        "null",
        "number"
       ]
      },
      "summary": {
       "type": [
        "null",
        "string"
       ]
      },
      "verdict": {
       "type": [
        "null",
        "string"
       ]
      },
      "degraded": {
       "type": [
        "boolean",
        "null"
       ]
      },
      "requests": {
       "type": [
        "null",
        "number"
       ]
      },
      "disclaimer": {
       "type": [
        "null",
        "string"
       ]
      },
      "notChecked": {
       "type": [
        "array",
      
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/llm-cost-capacity-calc-prompt-cache-savings-67f59249/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from llm-cost-calc.x402tookit.com](https://www.zero.xyz/host/llm-cost-calc.x402tookit.com/llms.txt)
