Skip to main content

Mission Control · API bay · §4.1

Prompt Caching Optimizer

Paste a prompt and we'll auto-segment it, classify each section stable / volatile, suggest the optimal cache_control breakpoint placement, and show the monthly savings across Anthropic, OpenAI, and Gemini.

1. Paste your prompt

2. Workload

Comma-separated labels to force-mark as volatile (case-insensitive).

3. Verdict

$8.67/mosaved with cache_control on Sonnet 4.6

Total tokens

226

Cacheable prefix

214

Saved per call

$0.0006

Reorder needed?

YES

  • Prompt is 226 tokens — below Anthropic's ~1024-token minimum for cache_control. Add stable reference material or skip caching.
  • Reorder would lift cacheable prefix from 0 → 214 tokens.

4. Detected segments (reordered)

  • STABLEcontext

    705 chars

  • STABLEexamples

    386 chars

    ↓ cache_control: { type: "ephemeral" }Stable prefix is only 214 tokens — under Anthropic's ~1024-token cache minimum. Expand stable content or skip caching.

  • VOLATILEUser: I want to ship a Stripe checkout f

    50 chars

5. Savings across providers

Provider · ModelInput $/MCache $/MSaved/mo
Haiku 4.5$1.00$0.10$2.89
Sonnet 4.6← pick$3.00$0.30$8.67
Opus 4.7$15.00$1.50$43.34
GPT-4o$2.50$1.25$4.01
Gemini 2.5 Pro$1.25$0.31$3.02

6. Reordered prompt (copy this)

How the optimizer thinks

Cache works on prefixes, not on chunks. If a single volatile block sits before your stable reference docs, NONE of those docs are cacheable. Stable-first ordering is the whole game.

Auto-segmentation honors structure. The optimizer prefers XML tags (<context>, <example>), markdown headings, and role markers (User:, Context:) as section boundaries.

Anthropic minimum is ~1k–2k tokens. Cache_control on a short prompt is a no-op. The optimizer flags this — don't pay for the cache-write overhead if you're under the floor.

Up to 4 breakpoints. Anthropic accepts 4 cache_control breakpoints per request. The optimizer suggests the primary one (after the last stable block) plus secondaries when stable content is unusually large.