Skip to content

Lab

Price the workload before the invoice does.

Estimate monthly AI token cost, see what caching, routing, compression and output caps save, and check peak traffic against rate limits.

Illustrative list prices as of October 2026, check the provider before relying on them. Rate limits and latencies are illustrative round numbers, not any provider’s real values. Every figure is editable.

Your workload

1,500,000 a month (30-day month)

Primary model
Edit prices and limits

Prices are US dollars per million tokens: illustrative list prices as of October 2026, check the provider. Limits are illustrative; yours depend on your account.

Frontier: Claude Opus 5.5
Mid: Claude Sonnet 5.5
Small and fast: Claude Haiku 5.5
Gateway optimisations

Applied in this order, each on what the previous one leaves.

Monthly cost

Before
US$21,000.00
After
US$7,411.50
Saving
US$13,588.50 (64.7%)

Where the saving comes from

  • Semantic cache−US$5,250.00 (25%)
  • Model routing−US$6,142.50 (29.3%)
  • Prompt compression−US$823.50 (3.9%)
  • Output token cap−US$1,372.50 (6.5%)
  • Still spent on model callsUS$7,411.50

Typical response time (p50)

Before
7.6 s
After
2 s

Illustrative. A cache hit returns in about 40 ms; once half of requests hit the cache, the median request never reaches a model. Shorter answers and smaller models also finish sooner.

Rate-limit check at peak

Before

  • Frontier (Claude Opus 5.5)400 of 1,000 RPM760,000 of 450,000 TPM Over the limit by 68.9%

After

  • Frontier (Claude Opus 5.5)180 of 1,000 RPM270,000 of 450,000 TPM 40% headroom
  • Small and fast (Claude Haiku 5.5)120 of 4,000 RPM180,000 of 2,000,000 TPM 91% headroom

Peak tokens per minute count input plus output tokens. Cached requests use no model quota, and routed requests use the other model’s quota, so both free headroom on the primary model.

Monthly cost US$21,000.00 before, US$7,411.50 after, saving US$13,588.50 (64.7%). Peak traffic fits within the illustrative rate limits after optimisation.

Set a workload, pick a model tier and switch on gateway optimisations one at a time. The simulator shows the monthly bill before and after, where each saving comes from, what happens to typical response time, and whether your busiest minute still fits inside the rate limits.

How the maths works

  • Cost per request is input tokens times the input price plus output tokens times the output price, both per million tokens. Monthly volume assumes a 30-day month.
  • Optimisations stack in a fixed order: semantic cache first, then model routing on the cache misses, then prompt compression and the output cap on whatever still reaches a model.
  • No double counting. Each saving is measured against the cost left by the steps before it, so the parts always add up to the total. That is also why four optimisations together save less than the sum of each one on its own.
  • Money is rounded to the cent only at the end; peak requests and tokens per minute are rounded up, because a partial request still counts against a limit.

What the numbers leave out

  • Prices change. The defaults are illustrative list prices for Anthropic models at the date shown. Check the provider, and include any discounts, batch pricing or prompt caching you already have.
  • Rate limits and latencies are illustrative round numbers, not any provider's real values. Real limits depend on your account and usage tier, and some providers count input and output tokens separately.
  • Cache hits are treated as free. A real semantic cache costs something to run: embedding each question, a vector store and the gateway itself.
  • The output cap trims the average answer. A real cap only cuts long answers, and cutting them can hurt quality, so measure before you set one.
  • Routing only works when the cheaper model is good enough for the requests you send it. Measure answer quality per route, not just cost.

Why this belongs in the gateway

Caching, routing, compression and token limits are all policies that sit between your applications and the model providers. Putting them in one gateway means every team gets them without rewriting their code, and the platform team can see cost and headroom for all traffic in one place.

All Lab experiences