---
title: "Prompt Caching Savings Calculator (LLM API Costs)"
method: POST
path: "/api/v1/tools/prompt-caching-savings-calculator"
tags: ["ai"]
---

# Prompt Caching Savings Calculator (LLM API Costs)

`POST /api/v1/tools/prompt-caching-savings-calculator`

## Request

- Base URL: `https://calcfleet.com`
- URL: `https://calcfleet.com/api/v1/tools/prompt-caching-savings-calculator`
- Auth: none declared

Estimate how much prompt caching cuts your LLM API bill: monthly input tokens, cacheable share, and hit rate give per-model savings, cache writes included.

## Request body

- object
  - `monthlyInputTokensM` number, required
  - `cacheableSharePct` number, required
  - `hitRatePct` number, required
  - `modelId` 'gpt-5.5' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'claude-opus-4.8' | 'claude-sonnet-4.6' | 'claude-haiku-4.5' | 'gemini-3.5-flash' | 'gemini-3.1-pro' | 'gemini-2.5-flash', required

## Response `200`

Successful calculation result.

- object
  - `result` object, required: Structured calculation output (fields vary per calculator).

## Other responses

- `400`: Invalid input — the issues array contains Zod validation errors.
- `403`: Forbidden — an Authorization: Bearer cf_… key was supplied but is invalid.
- `404`: Unknown tool slug.

---

[API](https://skmtc.dev/calcfleet/apis/calcfleet-financial-calculators-api.md) · [All operations](https://skmtc.dev/calcfleet/apis/calcfleet-financial-calculators-api/llms.txt) · [OpenAPI document](https://skmtc.dev/calcfleet/apis/calcfleet-financial-calculators-api/revisions/cd9abd595bbe?raw)
